Edit report at http://bugs.php.net/bug.php?id=52270&edit=1

 ID:               52270
 Updated by:       johan...@php.net
 Reported by:      user at niepodam dot pl
 Summary:          Anonymous functions :: Example #2 :: parse error,
                   unexpected T_FUNCTION
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          *General Issues
 Operating System: Windows/Linus
 PHP Version:      5.2.13

 New Comment:

The page has a box telling you:



    Note:  Anonymous functions are available since PHP 5.3.0.


Previous Comments:
------------------------------------------------------------------------
[2010-07-07 00:30:44] 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');

?>



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52270&edit=1

Reply via email to