3v4l.org

run code in 300+ PHP versions simultaneously
<?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 X50Bh 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 X50Bh on line 16
Process exited with code 255.

preferences:
161.53 ms | 1395 KiB | 31 Q