3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayObject = new ArrayObject(); $arrayObject->append(new stdClass()); $arrayObject->append(new stdClass()); var_dump(key($arrayObject));
Output for 8.1rc1 - rc3
Deprecated: key(): Calling key() on an object is deprecated in /in/7sonB on line 7 NULL
Output for 7.4.0 - 7.4.26, 8.0.0 - 8.0.13
NULL
Output for 7.3.0 - 7.3.33
int(0)

preferences:
32.81 ms | 461 KiB | 5 Q