3v4l.org

run code in 300+ PHP versions simultaneously
<?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.4.0
int(387392) int(387800) int(387800)
Output for 7.3.0 - 7.3.12
int(387288) int(387696) int(387696)
Output for 7.2.17 - 7.2.25
int(383440) int(383848) int(383848)
Output for 7.2.0
int(383480) int(383888) int(383888)
Output for 7.1.26 - 7.1.33
int(346736) int(347144) int(347144)
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7
int(346808) int(347216) int(347216)
Output for 7.1.5 - 7.1.6
int(347152) int(347560) int(347560)
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.0.5, 5.1.0 - 5.1.6, 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.3.11, 4.4.0 - 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

preferences:
194.55 ms | 401 KiB | 248 Q