3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '$empty' => array(), '$full' => range(1, 1000), ); $count = 100 * 1000; foreach ($tests as $name => $array) { printf("%-10s", $name); $start = microtime(true); $i = $count; while ($i-- > 0) { (bool) $array; } $total = microtime(true) - $start; printf("%.2F sec total, %.4F sec/iter\n", $total, $total / $count); }

preferences:
39.38 ms | 402 KiB | 5 Q