3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $test1 = 'hello'; protected $test2 = 'world'; protected $test3; public function toArray() { $this->test1 = null; $this->test3 = false; $array = get_object_vars($this); return array_filter($array, 'strlen'); } } $a = new A(); print_r(array_filter(array(1,2,false,null)); exit(); print_r($a->toArray());
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected ';' in /in/fVBdo on line 26
Process exited with code 255.