3v4l.org

run code in 300+ PHP versions simultaneously
<?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());
Output for 7.4.0 - 7.4.1
int(388192) int(396768) int(399968)
Output for 7.3.0 - 7.3.13
int(388104) int(396680) int(399880)
Output for 7.2.0 - 7.2.26
int(384192) int(392768) int(395968)
Output for 7.1.0 - 7.1.33
int(347520) int(356384) int(359584)
Output for 7.0.3 - 7.0.33
int(347528) int(356392) int(359592)
Output for 7.0.0 - 7.0.2
int(347016) int(355880) int(359080)
Output for 5.6.3 - 5.6.40
int(218688) int(228984) int(237120)
Output for 5.6.0 - 5.6.2
int(218592) int(228888) int(237024)
Output for 5.5.18 - 5.5.38
int(218688) int(228968) int(237112)
Output for 5.5.0 - 5.5.17
int(218592) int(228872) int(237008)
Output for 5.4.10 - 5.4.45
int(219112) int(229392) int(237528)
Output for 5.4.0 - 5.4.9
int(218584) int(228864) int(237000)
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.0.5, 5.1.0 - 5.1.6, 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.3.11, 4.4.0 - 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

preferences:
242.56 ms | 401 KiB | 325 Q