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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 03:01:29 2024 UTC