3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $values = array( 'one' => array( 'title' => 'Title One', 'uri' => 'http://example.com/one', ), 'two' => array( 'title' => 'Title Two', 'uri' => 'http://example.com/two', ), ); $a = function($values) { $return = array(); foreach($values as $value) $return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>'; return $return; }; echo ($a instanceof Closure); $final_string = implode(' | ', function($values) { $return = array(); foreach($values as $value) $return[] = '<a href="' . $value['uri'] . '">' . $value['title'] . '</a>'; return $return; }()); echo $final_string;
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.4.16
Parse error: syntax error, unexpected '(' in /in/JAs52 on line 32
Process exited with code 255.