3v4l.org

run code in 300+ PHP versions simultaneously
<?php // PHP 5.0 or later: $array = []; var_dump(empty($array)); // outputs bool(true) $array = new ArrayObject(); var_dump(empty($array)); // outputs bool(false) // why don't these both produce the same output?<?php

preferences:
41.56 ms | 402 KiB | 5 Q