|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-01 18:46 UTC] felipe@php.net
-Type: Bug
+Type: Feature/Change Request
[2011-07-01 18:46 UTC] felipe@php.net
[2012-11-23 04:38 UTC] nickmokisasian at gmail dot com
[2012-11-23 09:06 UTC] laruence@php.net
-Status: Open
+Status: Wont fix
[2012-11-23 09:06 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 14:00:01 2025 UTC |
Description: ------------ You can't declare an anonymous function in an array declaration inside a class declaration. Test script: --------------- <?php class Foo { static $array = array("hi" => function() { phpinfo(); }); } Foo::$array["hi"](); Expected result: ---------------- phpinfo being displayed Actual result: -------------- Parse error: syntax error, unexpected T_FUNCTION in /path/to/script.php on line 5