3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('ITERATIONS', 10000000); $start = microtime(true); $var = 0; while ($var < ITERATIONS) { ++$var; } $stop = microtime(true); printf("Loop type %8s took %f seconds\n", 'while', $stop - $start); $start = microtime(true); $var = 0; do { ++$var; } while ($var < ITERATIONS); $stop = microtime(true); printf("Loop type %8s took %f seconds\n", 'do-while', $stop - $start); $start = microtime(true); for ($var = 0; $var < ITERATIONS; ++$var) { //do nothing } $stop = microtime(true); printf("Loop type %8s took %f seconds\n", 'for', $stop - $start);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.12 ms | 1449 KiB | 13 Q