3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh async function getPage($url) { $fp = fopen($url, 'r'); await $fp; return stream_get_contents($fp); } $pages = await [ getPage('http://php.net'), getPage('http://example.com'), getPage('http://hhvm.com') ];
based on XXbZI
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34
Parse error: syntax error, unexpected 'async' (T_STRING) in /in/b6pmM on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh async function getPage($url) { $fp = fopen($url, 'r'); await $fp; return stream_get_contents($fp); } $pages = await [ getPage('http://php.net'), getPage('http://example.com'), getPage('http://hhvm.com') ];