3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $emailLog; public function initialize() { $this->emailLog = new ArrayObject([1, 2, 3]); } public function summary() { return count($this->emailLog) === 0 ? '' : count($this->emailLog); } } $log = new Foo; $log->initialize(); echo $log->summary(); ?>

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
154.08 ms | 2176 KiB | 10 Q