3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = 'foo'; var_dump(memory_get_usage()); foreach (range(1,100) as $i) { $$i = $foo; } var_dump(memory_get_usage()); foreach (range(1,100) as $y) { $$y &= $foo; } var_dump(memory_get_usage());
based on Cj4q8
Output for 7.1.0
int(347592) int(356456) int(359656)
Output for 7.0.3 - 7.0.14
int(347600) int(356464) int(359664)
Output for 7.0.0 - 7.0.2
int(347088) int(355952) int(359152)
Output for 5.6.7 - 5.6.28
int(218872) int(229168) int(237304)
Output for 5.5.24 - 5.5.35
int(218872) int(229152) int(237296)
Output for 5.4.10 - 5.4.45
int(219296) int(229576) int(237712)
Output for 5.4.0 - 5.4.9
int(218768) int(229048) int(237184)
Output for 5.3.11 - 5.3.29
int(622584) int(632872) int(641016)
Output for 5.3.0 - 5.3.10
int(622280) int(632568) int(640712)
Output for 5.2.10 - 5.2.17
int(80216) int(90496) int(97832)
Output for 5.2.7 - 5.2.9
int(80912) int(105768) int(112992)
Output for 5.2.3 - 5.2.6
int(81232) int(106088) int(113312)
Output for 5.2.2
int(79128) int(103952) int(111208)
Output for 5.2.1
int(79128) int(102816) int(110168)
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/JqgM4 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/JqgM4 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/JqgM4 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/JqgM4 on line 3