3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function b($i = 0) { if ($i > 25000) { die; } if ($i % 5000 == 0) { echo memory_get_usage() . "\n"; } self::b(++$i); } } $a=new a; $a->b();
Output for 7.4.0 - 7.4.1
387528 1173992 2222568 3271144 4319720 5368296
Output for 7.3.0 - 7.3.13
387488 1173952 2222528 3271104 4319680 5368256
Output for 7.2.0 - 7.2.26
383560 1170024 2218600 3267176 4315752 5364328
Output for 7.1.0 - 7.1.33
346888 1133352 2181928 3230504 4279080 5327656
Output for 7.0.0 - 7.0.33
347016 1395624 2706344 3754920 5065640 6114216
Output for 5.6.0 - 5.6.40
220600 2687400 5154128 7751840 10218568 12816280
Output for 5.5.0 - 5.5.38
220592 2687352 5154080 7620808 10087536 12554264
Output for 5.4.0 - 5.4.45
221104 2556904 5023632 7359376 9826104 12161848
Output for 5.3.11 - 5.3.29
623240 2958512 5817592 8676672 11535752 14394832
Output for 5.3.0 - 5.3.10
622936 2958208 5817288 8676368 11535448 14394528
Output for 5.2.10 - 5.2.17
81248 1872720 3665224
Process exited with code 139.
Output for 5.2.7 - 5.2.9
81976 1874528 3666992
Process exited with code 139.
Output for 5.2.6
82296 1874856 3667352
Process exited with code 139.
Output for 5.2.3 - 5.2.5
82296 1874856 3667312
Process exited with code 139.
Output for 5.2.2
80320 1872824 3665304
Process exited with code 139.
Output for 5.2.1
80320 1871720 3664208
Process exited with code 139.
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/OFnp1 on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/OFnp1 on line 12
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/OFnp1 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/OFnp1 on line 12

preferences:
205.72 ms | 401 KiB | 325 Q