3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! for ($i=0; $i< 1000000 ; $i++) { define('TEST'.$i,$i*12); } echo TEST456;
Output for 8.1.28, 8.2.16 - 8.2.18, 8.3.3 - 8.3.6
Out of memory
Process exited with code 1.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.29, 5.6.34 - 5.6.40, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
5472
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.3, 7.2.6, 7.2.9 - 7.2.26
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4096 bytes) in /in/cDtIh on line 8
Process exited with code 255.
Output for 5.6.31 - 5.6.33, 7.2.4 - 7.2.5, 7.2.7 - 7.2.8

Process exited with code 137.
Output for 5.6.30
5472
Process exited with code 137.

preferences:
219.72 ms | 401 KiB | 333 Q