[ create a new paste ] login | about

Link: http://codepad.org/sIwUMMxI    [ raw code | output | fork | 1 comment ]

PHP, pasted on Mar 16:
1
2
3
4
5
6
7
<?php 
$greet = function($name)
{
printf(Hello %s\r\n, $name);
};
$greet(World);
$greet(PHP);


Output:
1
2

Parse error: syntax error, unexpected T_FUNCTION on line 2


Create a new paste based on this one


Comments:
posted by vinnizworld on Sep 21
Anonymous functions are supported from v5.3 and on...
reply