3v4l.org

run code in 300+ PHP versions simultaneously
<?php function main() { $x = array('hakunamatata' => 12); $s = 0; for ($i = 0; $i < 100000000; $i++) { $s += $x['hakunamatata']; } var_dump($s); } main();
Output for 7.4.0, 7.4.5, 7.4.30 - 7.4.33, 8.0.1, 8.0.5 - 8.0.7, 8.0.9 - 8.0.12, 8.0.14 - 8.0.17, 8.0.19 - 8.0.30, 8.1.0 - 8.1.3, 8.1.5 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.2, 8.3.4
int(1200000000)
Output for 5.4.1 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.4, 7.4.6 - 7.4.29, 8.0.0, 8.0.2 - 8.0.3, 8.0.8, 8.0.13, 8.0.18, 8.1.4, 8.3.3

Process exited with code 137.

preferences:
180.7 ms | 404 KiB | 223 Q