3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass; var_dump(memory_get_usage()); $a->foo = $a; var_dump(memory_get_usage()); unset($a); var_dump(memory_get_usage());
Output for 7.0.0 - 7.1.0
int(346808) int(347216) int(347216)
Output for hhvm-3.10.0 - 3.13.2
int(2097152) int(2097152) int(2097152)
Output for 5.6.0 - 5.6.28
int(217808) int(218112) int(218024)
Output for 5.5.0 - 5.5.38
int(217808) int(218096) int(218008)
Output for 5.4.10 - 5.4.45
int(218328) int(218616) int(218528)
Output for 5.4.0 - 5.4.9
int(217800) int(218088) int(218000)
Output for 5.3.11 - 5.3.29
int(620864) int(620992) int(620896)
Output for 5.3.0 - 5.3.10
int(620560) int(620688) int(620592)
Output for 5.2.10 - 5.2.17
int(78528) int(78656) int(78560)
Output for 5.2.7 - 5.2.9
int(79168) int(79384) int(79480)
Output for 5.2.3 - 5.2.6
int(79488) int(79704) int(79800)
Output for 5.2.1 - 5.2.2
int(77384) int(77520) int(77616)
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/LDGa0 on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/LDGa0 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/LDGa0 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/LDGa0 on line 4