3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $test; public function getTest() { return $this->test; } public function setTest($test) { $this->test = $test; } } $foo = new Foo; $foo->setTest('test'); $bar = (array) $foo; var_dump($bar);

preferences:
44.15 ms | 402 KiB | 5 Q