|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2014-11-29 11:02 UTC] jpauli@php.net
-Assigned To:
+Assigned To: jpauli
[2014-11-29 12:51 UTC] jpauli@php.net
[2014-12-01 03:39 UTC] laruence@php.net
[2014-12-01 03:39 UTC] laruence@php.net
[2014-12-01 07:10 UTC] nicolas dot grekas+php at gmail dot com
[2014-12-01 11:18 UTC] dmitry@php.net
[2014-12-04 11:03 UTC] stof at notk dot org
[2014-12-04 19:37 UTC] nikic@php.net
[2014-12-14 15:19 UTC] nicolas dot grekas+php at gmail dot com
[2014-12-16 13:19 UTC] jpauli@php.net
[2015-01-08 20:16 UTC] aharvey@php.net
-Type: Bug
+Type: Feature/Change Request
[2015-01-08 20:16 UTC] aharvey@php.net
[2015-01-09 11:47 UTC] jpauli@php.net
[2015-05-07 08:44 UTC] me at evertpot dot com
[2015-05-12 07:49 UTC] jpauli@php.net
[2015-05-12 11:45 UTC] jpauli@php.net
-Status: Assigned
+Status: Closed
[2015-05-12 11:45 UTC] jpauli@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Description: ------------ Since php5.4, call_user_func($a) is almost equivalent to $a() $a() works with all callables BUT ONE. A "foo::bar" string is OK for call_user_func(), but KO for pure syntax. This make the new (and more performant) syntax useless in generic code that want to accept any callable. Test script: --------------- <?php class foo{static function bar(){}} $a = 'foo::bar'; echo is_callable($a),"\n"; call_user_func($a); $a(); Expected result: ---------------- 1 Actual result: -------------- 1 Fatal error: Call to undefined function foo::bar() in ... on line 7