When would it be a good idea to use anonymous functions.
I like doing this for simple stuff like:
I was also wondering is this a good programming habit?
I like doing this for simple stuff like:
PHP:
<?php
$info = function() {
Return Array(
'Example' => 'I am anonymous function'
);
};
echo $info()['Example'];