3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { public $test1 = 1; protected $test2 = 2; private $test3 = 3; public function __construct(){} public function showVariables(){ printf("public : %d\nprotected: %d\nprivate: %d", $this->test1, $this->test2, $this->test3); } } tst = new Test(); tst->showVariables();
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected '=' in /in/O9hOV on line 15
Process exited with code 255.