3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ''; $len = 100; $start = microtime(true); for ($i = 0; $i < $len; $i++) { $html .= 'a'; } var_dump(microtime(true) - $start); $html = ''; $start = microtime(true); $tmp = array(); for ($i = 0; $i < $len; $i++) { $tmp[] = 'a'; } $html = join('', $tmp); var_dump(microtime(true) - $start);

preferences:
42.96 ms | 402 KiB | 5 Q