3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vars = array(); $var = 'abc'; for($i = 0; $i< 10000; $i++){ $vars[] = $var; } echo round(memory_get_usage()/1024, 2), 'KB';
Output for 7.1.0
854.86KB
Output for 7.0.0 - 7.0.14
854.88KB
Output for 5.5.24 - 5.6.21
1200.05KB
Output for 5.4.10 - 5.4.45
1200.58KB
Output for 5.4.0 - 5.4.9
1200.06KB
Output for 5.3.11 - 5.3.29
1594.07KB
Output for 5.3.0 - 5.3.10
1593.77KB
Output for 5.2.10 - 5.2.17
1064.42KB
Output for 5.2.7 - 5.2.9
1065.93KB
Output for 5.2.3 - 5.2.6
1066.25KB
Output for 5.2.2
1064.16KB
Output for 5.2.1
1063.65KB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/JYjjM on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/JYjjM on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/JYjjM on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/JYjjM on line 8