3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; protected $names=array('test'=>1); protexted $values=array('test value'); public function __get($property) { return $this->values[$property]; } public function __set($property, $value) { $this->values[$property]=$value; } } $foo= new $Foo(); echo $foo;
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected 'protexted' (T_STRING), expecting function (T_FUNCTION) in /in/np1hQ on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /in/np1hQ on line 6
Process exited with code 255.

preferences:
189.66 ms | 1386 KiB | 64 Q