3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyCl { protected db = "Hello"; // public function __get($property) { // // } } $obj = new MyCl(); $greet = $obj->db; var_dump($greet);
Output for 7.2.11
Parse error: syntax error, unexpected 'db' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /in/8p2Ki on line 4
Process exited with code 255.