|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesreflection-callable-poc (last revision 2016-12-10 18:57 UTC by cmb@php.net)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2016-06-08 04:00 UTC] pollita@php.net
-Status: Open
+Status: Analyzed
[2016-06-08 04:00 UTC] pollita@php.net
[2016-12-10 18:36 UTC] cmb@php.net
[2016-12-10 18:57 UTC] cmb@php.net
[2017-01-11 09:13 UTC] krakjoe@php.net
-Assigned To:
+Assigned To: cmb
[2017-01-11 09:13 UTC] krakjoe@php.net
[2017-01-12 16:28 UTC] cmb@php.net
-Assigned To: cmb
+Assigned To:
[2019-09-29 14:05 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2019-09-29 14:05 UTC] cmb@php.net
[2019-11-04 09:45 UTC] cmb@php.net
-Status: Analyzed
+Status: Suspended
[2019-11-04 09:45 UTC] cmb@php.net
[2020-06-28 09:49 UTC] cmb@php.net
-Status: Suspended
+Status: Closed
[2020-06-28 09:49 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ ReflectionParameter::isCallable always returns false. Test script: --------------- <?php foreach (get_defined_functions()['internal'] as $f) { $rf=new ReflectionFunction($f); for ($i=0;$i<$rf->getNumberOfParameters();++$i) { $rp=new ReflectionParameter($f,$i); if ($rp->isCallable()) echo $f," parameter ",$i,PHP_EOL; } } Expected result: ---------------- It should return true for some parameters of some internal functions, e.g. array_map param0. Actual result: -------------- Always false. As far as I checked, http://lxr.php.net/xref/PHP_7_0/ext/reflection/php_reflection.c#6413 it appears that isCallable is never set in the typehint of the function, and the issue is not with reflection, but with the way functions are stored.