3v4l.org

run code in 300+ PHP versions simultaneously
<?php $memory = memory_get_usage(); $array = range(1, 100000); echo (memory_get_usage() - $memory) / 1024 / 1024;
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.24, 8.4.1 - 8.4.11
2.0039825439453
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33
4.0039825439453
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
13.970405578613
Output for 5.3.0 - 5.3.10, 5.4.10 - 5.4.45
13.970413208008
Output for 5.4.0 - 5.4.9
13.970397949219
Output for 5.3.11 - 5.3.29
13.970428466797
Output for 5.2.10 - 5.2.17
13.207984924316
Output for 5.2.7 - 5.2.9
13.209014892578
Output for 5.2.6
13.208999633789
Output for 5.2.3 - 5.2.5
13.208969116211
Output for 5.2.2
13.208976745605
Output for 5.2.1
13.208473205566
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/c377f on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/c377f on line 3
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/c377f on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/c377f on line 3

preferences:
106.93 ms | 424 KiB | 5 Q