<?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();
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/jID4A on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/jID4A on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/jID4A on line 4
Process exited with code 255.