|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-07-07 00:30 UTC] user at niepodam dot pl
Description: ------------ http://www.php.net/manual/en/functions.anonymous.php example #2 produce error: Parse error: parse error, unexpected T_FUNCTION in ./ on line 4 Test script: --------------- <?php $greet = function($name) { printf("Hello %s\r\n", $name); }; $greet('World'); $greet('PHP'); ?> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 21:00:02 2025 UTC |
The page has a box telling you: Note: Anonymous functions are available since PHP 5.3.0.