|
|
|
|
|
by gngeal
4845 days ago
|
|
Hah, a nice article. :-) My favourite sentence from the PHP documentation: string create_function ( string $args , string $code ) "Creates an anonymous function from the parameters passed, and returns a unique name for it." So there you are. Of course you can choose to be an anonymous value, but you'll get a name assigned by the state, for free. :-) Fascinating logic, captain. |
|
create_function was a way to
A) not having to define a function separately
B) not getting problems with the function being re-defined, since each call would create a new function
C) fake closures by generating code.
All this should be moot points by now, since PHP has real anonymous functions with closures,