This syntax is valid only in PHP 5.4+, in earlier versions it should be $_data = array();
Automodeler error - $_data = [];
-
07-12-2021 - |
Question
I'm testing Kohana AutoModeler, but I think it is an PHP lack of knowledge.
I have just set it up and got this error ErrorException [ Parse Error ]: syntax error, unexpected '['
in /classes/context/user/add/factory.php.
When I open the file, Dreamweaver did not recognize this line protected $_data = [];
and this line public function __construct(array $data = [])
probably because of []
.
In fact I did not find what is the meaning of $var = [] or how could a resolve this.
Any help you'd be appreciated
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow