3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { list($a, $b) = [$b, $a]; } echo microtime(true) - $time . PHP_EOL; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { $t = $a; $a = $b; $b = $t; } echo microtime(true) - $time . PHP_EOL;

preferences:
40.11 ms | 404 KiB | 5 Q