3v4l.org

run code in 300+ PHP versions simultaneously
<?php $memory1 = memory_get_usage(true); print 'before: ' . $memory1 ."\n"; $keys = array(); for ($i = 0; $i<150000; $i++) { $keys[] = 'pref:keyname:' . rand(1000000, 19999999); } asort($keys); $memory2 = memory_get_usage(true); print 'after: ' . $memory2 ."\n"; print 'allocated: ' . ($memory2 - $memory1);

preferences:
23.96 ms | 406 KiB | 5 Q