php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61697
Patch bug61697.phpt revision 2012-04-12 05:19 UTC by laruence@php.net
Patch bug61697.patch revision 2012-04-12 05:16 UTC by laruence@php.net

Patch bug61697.phpt for SPL related Bug #61697

Patch version 2012-04-12 05:19 UTC

Return to Bug #61697 | Download this patch
Patch Revisions:

Developer: laruence@php.net

--TEST--
Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
--FILE--
<?php

function f1($class) { echo "f1: [[$class]]\n"; }
function f2($class) { echo "f2: [[$class]]\n"; }

spl_autoload_register('f1');
spl_autoload_register('f2');
spl_autoload_register(create_function('$class', 'echo "cf1: [[$class]]\n";'));
spl_autoload_register(create_function('$class', 'echo "cf2: [[$class]]\n";'));

foreach (spl_autoload_functions() AS $func)
{
    spl_autoload_unregister($func);
}

print_r(spl_autoload_functions());
?>
--EXPECTF--
Array
(
)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC