mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
fc8426ad31
Need to point the second elements previous item to head so we can traverse upwards.
27 lines
480 B
PHP
27 lines
480 B
PHP
--TEST--
|
|
SPL: Bug #48493 spl_autoload_unregister() can't handle prepended functions
|
|
--FILE--
|
|
<?php
|
|
function autoload1() {}
|
|
|
|
function autoload2() {}
|
|
|
|
spl_autoload_register('autoload2');
|
|
spl_autoload_register('autoload1', true, true);
|
|
var_dump(spl_autoload_functions());
|
|
|
|
spl_autoload_unregister('autoload2');
|
|
var_dump(spl_autoload_functions());
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[0]=>
|
|
string(9) "autoload1"
|
|
[1]=>
|
|
string(9) "autoload2"
|
|
}
|
|
array(1) {
|
|
[0]=>
|
|
string(9) "autoload1"
|
|
}
|