3v4l.org

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

preferences:
31.6 ms | 402 KiB | 5 Q