PHP 7: Immediately Invoked Function Expressions

PHP7 will continue to borrow some of the beloved JavaScript features and will support Immediately Invoked Function Expressions (IIFEs): <?php echo (function() { return 42; })(); Output for [email protected] – 20141101: 42 Since we can already return functions from inside other functions, Currying Partial Application is also possible in combination with the IIFE implementation: <?php […]