3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(memory_get_usage()); var_dump(memory_get_usage()); var_dump(memory_get_usage()); $tmp = tmpfile(); var_dump(memory_get_usage()); fclose($tmp); var_dump(memory_get_usage());
Output for 7.0.0 - 7.1.0
int(346560) int(346592) int(346592) int(347128) int(346624)
Output for 5.6.10 - 5.6.28
int(217392) int(217440) int(217440) int(218304) int(217608)
Output for 5.6.0 - 5.6.9
int(217392) int(217440) int(217440) int(218272) int(217576)
Output for 5.5.26 - 5.5.38
int(217392) int(217424) int(217424) int(218288) int(217592)
Output for 5.5.0 - 5.5.25
int(217392) int(217424) int(217424) int(218256) int(217560)
Output for 5.4.10 - 5.4.45
int(217912) int(217944) int(217944) int(218776) int(218080)
Output for 5.4.0 - 5.4.9
int(217384) int(217416) int(217416) int(218248) int(217552)
Output for 5.3.11 - 5.3.29
int(620848) int(620880) int(620880) int(621712) int(621024)
Output for 5.3.0 - 5.3.10
int(620544) int(620576) int(620576) int(621408) int(620720)
Output for 5.2.10 - 5.2.17
int(78488) int(78520) int(78520) int(79344) int(78656)
Output for 5.2.7 - 5.2.9
int(78920) int(79136) int(79136) int(79760) int(79888)
Output for 5.2.3 - 5.2.6
int(79240) int(79456) int(79456) int(80080) int(80208)
Output for 5.2.1 - 5.2.2
int(77136) int(77272) int(77272) int(77896) int(78064)
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/331Ac on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/331Ac on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/331Ac on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/331Ac on line 3