Skip to content

PHP 8.5: replace all instances of array_pop() in ::fromXML() with array_last() #76

@tvdijen

Description

@tvdijen

As soon as PHP 8.5 becomes the minimum required version for this library:
https://www.php.net/releases/8.5/en.php#array-first-and-last-functions

Using array_pop() is changing the original array by removing the last item from it, which may cause unexpected behaviour. array_last() doesn't do this, so it should in theory also be faster

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions