为什么我在Redhat linux中遇到CodeIgniter REST_Controller错误

I have written a code in CodeIgniter and it is running on Ubuntu but when I try to run it in Redhat it gives me the error below :

syntax error, unexpected '[' in /var/www/html/dgfp-v1/application/libraries/REST_Controller.php on line 32

Please help me.

I agree with mdamia, it should be something to do with PHP version. I have the same issue and after replacing the [] with array(). I've received another error Using PHP v5.3.24, though PHP v5.4 or greater is required Using PHP v5.3.24, though PHP v5.4 or greater is required

Here it is the REST_Controller.php i have updated. enter link description here

Hope this help