3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[1] = 'toto'; echo memory_get_usage() . '\n'; $a[2] = 'titi'; echo memory_get_usage() . '\n'; $a[1000000] = 'tata'; echo memory_get_usage() . '\n';

preferences:
35.32 ms | 402 KiB | 5 Q