|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-09 21:42 UTC] kalle@php.net
-Package: SPL related
+Package: Documentation problem
[2010-03-18 16:47 UTC] kalle@php.net
[2010-03-18 16:47 UTC] kalle@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: kalle
[2010-03-18 16:47 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 10:00:01 2025 UTC |
Description: ------------ The documentation fails to mention that the $prepend parameter was added in php 5.3 Test script: --------------- <?php function foo($class) {} function bar($class) {} spl_autoload_register('foo'); spl_autoload_register('bar', true, true); $funcs = spl_autoload_functions(); assert('bar' == $funcs[0]); assert(2 == count($funcs)); print_r($funcs); Expected result: ---------------- According to the documentation, the two assertions in the test scripts should pass for any php version >= 5.1.2. However, the two assertions fail in 5.2.13. Expected output Array ( [0] => bar, [1] => foo ) Actual result: -------------- Warning: assert(): Assertion failed in blah.php on line 9 Warning: assert(): Assertion failed in blah.php on line 10 Array ( [0] => foo )