3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class SG_Endpoint{ var $secret_password; public function __construct( $secret_password ){ $this->secret_password = $secret_password; } } $sgendpoint = new SG_Endpoint( "foobar" ); echo $sgendpoint->secret_password
Output for 5.4.0 - 5.4.6
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/fRGGq on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.16
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/fRGGq on line 16
Process exited with code 255.