Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
TeMPOraL
on Oct 8, 2013
|
parent
|
context
|
favorite
| on:
PHP in a Tweet
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);
cheald
on Oct 8, 2013
[–]
I'm really glad that 5.3 got proper anonymous functions. Specifying function bodies as strings to be eval'd makes me twitch.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: