<?php class Foo { private $bar = 42; } $toArray = (function() { return (array) $this; })->call(new Foo); var_dump((array) new Foo); var_dump($toArray);
You have javascript disabled. You will not be able to edit any code.