- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
- Parse error: syntax error, unexpected '[', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/6I6Pl on line 12
Process exited with code 255.
<?php
class Test {
public $str = "string";
function __construct(){
return $this->str;
}
}
$Test = new Test();
echo $Test->[0]->$str;