3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=''; for ($i=0; $i<32*1024; $i++) { $x .= str_repeat(' ', 1024); } echo memory_get_usage();
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 31457312 bytes) in /in/jggoa on line 6
Process exited with code 255.
Output for 5.5.0 - 5.5.36, 5.6.0 - 5.6.28
33771736
Output for 5.4.10 - 5.4.45
33772256
Output for 5.4.0 - 5.4.9
33771728
Output for 5.3.11 - 5.3.29
34174888
Output for 5.3.0 - 5.3.10
34174584
Output for 5.2.10 - 5.2.17
33632512
Output for 5.2.7 - 5.2.9
33632992
Output for 5.2.3 - 5.2.6
33633312
Output for 5.2.1 - 5.2.2
33631240
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/jggoa on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/jggoa on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/jggoa on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/jggoa on line 9

preferences:
179.12 ms | 401 KiB | 224 Q