3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'foo' => 'bar', ); $timestamp = microtime(true); for ($i=1;$i<10000;$i++) { if (array_keys($array)) {} } $1timestamp = microtime(true)-$timestamp; var_dump($1timestamp); for ($i=1;$i<10000;$i++) { if (!empty($array)) {} } $2timestamp = microtime(true)-$timestamp; var_dump($2timestamp);
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/G5ZTj on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.25
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/G5ZTj on line 12
Process exited with code 255.