php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51241 missing changelog for prepend parameter on spl_autoload_register
Submitted: 2010-03-08 22:16 UTC Modified: 2010-03-18 16:47 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: martin at ringehahn dot de Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.13 OS:
Private report: No CVE-ID: None
 [2010-03-08 22:16 UTC] martin at ringehahn dot de
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
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-09 21:42 UTC] kalle@php.net
-Package: SPL related +Package: Documentation problem
 [2010-03-18 16:47 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=296345
Log: Fixed bug #51241 (missing changelog for prepend parameter on spl_autoload_register)
 [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
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=bce4e614ec69b7eaa99b0f29a0e209fa74dd262b
Log: Fixed bug #51241 (missing changelog for prepend parameter on spl_autoload_register)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 22:01:33 2024 UTC