3v4l.org

run code in 200+ PHP versions simultaneously
<?php gc_enable(); echo memory_get_usage(true)/1024 . "\n"; function callFunc($i = 0) { if ($i < 100000) { gc_collect_cycles(); callFunc(++$i); } } gc_collect_cycles(); callFunc(); gc_collect_cycles(); echo memory_get_usage(true)/1024 . "\n"; callFunc(); gc_collect_cycles(); echo memory_get_usage(true)/1024 . "\n";
Output for 7.0.0 - 7.2.0
2048 4096 4096
Output for 5.6.0 - 5.6.28
256 2304 2304