3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = ''; for ($i = 0; $i < 1e4; $i++) { $str .= md5(time()); } echo strlen($str); $memory = memory_get_usage(true); substr($str, 0); echo memory_get_usage(true)-$memory;
Output for 5.2.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
3200000
Output for 5.0.0 - 5.2.0
320000 Fatal error: Call to undefined function memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
320000 Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
320000 Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
320000 Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9