Home  >  Article  >  Backend Development  >  How to solve the problem of symbol error that keeps getting reported?

How to solve the problem of symbol error that keeps getting reported?

WBOY
WBOYOriginal
2016-07-06 13:54:071176browse

private $_specialWhiteList = [

<code>    'table' =>  'table|tbody|thead|tfoot|tr|td|th'
];
运行时老是报错syntax error, unexpected '['
该怎么解决啊?





</code>

Reply content:

private $_specialWhiteList = [

<code>    'table' =>  'table|tbody|thead|tfoot|tr|td|th'
];
运行时老是报错syntax error, unexpected '['
该怎么解决啊?





</code>

The PHP version is too low, resulting in syntax incompatibility.
Solution 1: Upgrade PHP to 5.4 or above
Solution 2: Replace [] with array()

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn