3v4l.org

run code in 300+ PHP versions simultaneously
<?php function build_array() { for ($i=0;$i<10000;$i++){ $a[$i]=$i; } $i=null; return $a; } echo memory_get_usage(true)."\n\r"; $a = build_array(); echo memory_get_usage(true)."\n\r"; unset($a); echo memory_get_usage(true)."\n\r";

preferences:
60.63 ms | 1263 KiB | 5 Q