February 6, 2015 | In: Programovanie
php5.5 and php5.6 new crazy futures
Some crazy stuff you can do with php5.5/5.6
function omg(Callable...$omgs) { foreach ($omgs as $omg) { var_dump($omg($omg)); } } omg('strlen'); // 6 function omg2(array...$omgs) { foreach ($omgs as list($omg1, $omg2)) { var_dump($omg1($omg2)); } } omg2(['strlen', 'two'], ['strlen', 'bar']); // 3, 3
Comments are closed.