saml2 icon indicating copy to clipboard operation
saml2 copied to clipboard

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

Open tvdijen opened this issue 1 month ago • 0 comments

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

tvdijen avatar Dec 05 '25 14:12 tvdijen