php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68641 spl_autoload_register arguments informations
Submitted: 2014-12-23 17:16 UTC Modified: 2014-12-28 01:07 UTC
From: contact at jubianchi dot fr Assigned: levim (profile)
Status: Closed Package: Reflection related
PHP Version: 5.3.0 OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: contact at jubianchi dot fr
New email:
PHP Version: OS:

 

 [2014-12-23 17:16 UTC] contact at jubianchi dot fr
Description:
------------
The arguments informations returned by the reflection API on the spl_autoload_register function is incomplete: only the first parameter (autoload_function ) is listed

Test script:
---------------
<?php

// http://3v4l.org/LOUY1

$function = new \reflectionFunction('spl_autoload_register');

echo 'Parameters:' . PHP_EOL;

foreach ($function->getParameters() as $parameter)
{
    echo '* ' . $parameter->getName() . PHP_EOL;
}

echo str_repeat('-', 20) . PHP_EOL;

echo $function->getNumberOfRequiredParameters() . '/' . $function->getNumberOfParameters() . PHP_EOL;

Expected result:
----------------
Parameters:
* autoload_function
* throws
* prepend
--------------------
0/3

Actual result:
--------------
Parameters:
* autoload_function
--------------------
0/1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-28 01:07 UTC] levim@php.net
-Operating System: OSX +Operating System: Irrelevant -PHP Version: 5.4.36 +PHP Version: 5.3.0 -Assigned To: +Assigned To: levim
 [2014-12-28 02:06 UTC] levim@php.net
Automatic comment on behalf of levim
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9a7ee202bb60da68e84fac991d2635569f243474
Log: Fix bug #68641
 [2014-12-28 02:06 UTC] levim@php.net
-Status: Assigned +Status: Closed
 [2016-07-20 11:40 UTC] davey@php.net
Automatic comment on behalf of levim
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9a7ee202bb60da68e84fac991d2635569f243474
Log: Fix bug #68641
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 11:01:36 2025 UTC