3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vars = array(); $var = 'abcdefghijakjsdkfjsldkfjlskajflksjldfkjlskdfjalsjdflskdjfskldfjslkdfjsdlkfjdslkfjsdlkfjsdflkjsdklfjsdklfjksdjflksdjflksdfsdfsdfsdfsdfsdfsdfsdfsdf'; for($i = 0; $i< 50000; $i++){ $vars[] = $var; } echo round(memory_get_usage()/1024, 2), 'KB';
Output for 7.1.0
2391.04KB
Output for 7.0.0 - 7.0.14
2391.05KB
Output for hhvm-3.10.0 - 3.12.0
4096KB
Output for 5.5.0 - 5.6.28
5021.55KB
Output for 5.4.10 - 5.4.45
5022.05KB
Output for 5.4.0 - 5.4.9
5021.54KB
Output for 5.3.11 - 5.3.29
5415.84KB
Output for 5.3.0 - 5.3.10
5415.55KB
Output for 5.2.10 - 5.2.17
4886.16KB
Output for 5.2.7 - 5.2.9
4887.72KB
Output for 5.2.3 - 5.2.6
4888.02KB
Output for 5.2.2
4885.98KB
Output for 5.2.1
4885.46KB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/0snNs 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/0snNs 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/0snNs 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/0snNs on line 8