3v4l.org

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

preferences:
23.01 ms | 461 KiB | 5 Q