3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $a; protected $b; private $c; public function __construct() { $this->a = 'A_a'; $this->b = 'A_b'; $this->c = 'A_c'; } } class B extends A { public $b; private $c; public function __construct() { parent::__construct(); $this->b = 'B_b'; $this->c = 'B_c'; } } $b = new B; var_dump($b); $array = (array) $b; var_dump($array); echo str_replace("\0", '\0', var_export($b, true)); foreach ($array as $k => $v) { var_dump([bin2hex($k), $k, $v]); }