3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'foo' => 'bar', ); $timestamp = time(); for ($i=1;$i<10000;$i++) { if (array_keys($array)) {} } $timestamp = time()-$timestamp; var_dump($timestamp); for ($i=1;$i<10000;$i++) { if (!empty($array)) {} } $timestamp = time()-$timestamp; var_dump($timestamp);
Output for 4.3.0 - 5.6.24, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(0) int(1368687823)