3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo memory_get_usage(), PHP_EOL; $s = str_repeat('c', 1000); echo memory_get_usage(), PHP_EOL; $s = (string) $s; echo memory_get_usage(), PHP_EOL;
Output for 7.2.0
382720 384032 384032
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7
346112 347424 347424
Output for 7.1.5 - 7.1.6
346360 347672 347672
Output for 5.6.8 - 5.6.28
217008 218216 218216
Output for 5.5.24 - 5.5.35
217008 218208 218208
Output for 5.4.10 - 5.4.45
217528 218728 218728
Output for 5.4.0 - 5.4.9
217000 218200 218200
Output for 5.3.11 - 5.3.29
620224 621424 621424
Output for 5.3.0 - 5.3.10
619920 621120 621120
Output for 5.2.10 - 5.2.17
78224 79416 79416
Output for 5.2.7 - 5.2.9
78592 79824 79920
Output for 5.2.3 - 5.2.6
78912 80144 80240
Output for 5.2.2
76840 78040 78136
Output for 5.2.1
76840 78040 78040
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/b2U4O 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/b2U4O 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/b2U4O 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/b2U4O on line 3

preferences:
125.95 ms | 401 KiB | 175 Q