3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = '.'; $a = ''; for ($i=0;$i<1000;$i++) $a = "$a$x"; unset($a,$x); echo memory_get_usage()."\n";
Output for 7.1.0
346312
Output for 7.0.0 - 7.0.14
346328
Output for 5.5.0 - 5.6.28
217184
Output for 5.4.10 - 5.4.45
217704
Output for 5.4.0 - 5.4.9
217176
Output for 5.3.11 - 5.3.29
620560
Output for 5.3.0 - 5.3.10
620256
Output for 5.2.10 - 5.2.17
78376
Output for 5.2.7 - 5.2.9
115072
Output for 5.2.3 - 5.2.6
115392
Output for 5.2.2
109792
Output for 5.2.1
84032
Output for 5.0.0 - 5.2.0
<br /> <b>Fatal error</b>: Call to undefined function memory_get_usage() in <b>/in/CLKkI</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/CLKkI</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/CLKkI</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/CLKkI</b> on line <b>8</b><br />