3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $a = 0; protected $b = true; public $c = 'hello'; } class Another extends Test { private $a = 1; protected $b = false; public $d ='wow'; } $obj = new Another(); $data = (array) $obj; $new = (object) $data; print_r($data); print_r($new);

preferences:
42.76 ms | 402 KiB | 5 Q