Hacker News new | ask | show | jobs
by TeMPOraL 4630 days ago
Prior to PHP 5.3 this could work as well:

    array_reduce(array(1,2,3,4,5), create_function('$v, $e', 'return $v | $e;'), 0);
1 comments

I'm really glad that 5.3 got proper anonymous functions. Specifying function bodies as strings to be eval'd makes me twitch.