3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php Class A { public $property; public function __construct( $prop ) { $this->property = $prop; } public function returnValue(){ return static::${this->property}; } } Class B extends A { public static $property_one = 'This is first property'; public static $property_two = 'This is second property'; } $B = new B( 'property_one' ); $B->returnValue();
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/2Veqt on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/2Veqt on line 12
Process exited with code 255.