3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test{ public $test = "toto"; private $esaegaegt = "togaegegto"; public function jsencode(){ return json_encode($this); } public function temp(){ $tmp = new ReflectionClass($this); var( $tmp->getProperties() ); die(); return json_encode(get_object_vars($this)); } } $a = new test(); var_dump($a->temp());
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/UrSIl on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VAR in /in/UrSIl on line 12
Process exited with code 255.

preferences:
191.21 ms | 1395 KiB | 60 Q