3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = array(); for ($i=0; $i<10; $i++) { $foo = new stdClass(); $foo->id = $i; $objectHash = spl_object_hash($foo); $objects[$objectHash] = $objectHash; } echo count($objects);

preferences:
43.27 ms | 402 KiB | 5 Q