ballhogjoni Posted May 21, 2016 Share Posted May 21, 2016 (edited) Using PHP 5.3.3 The error points out this line of code: return [$a[$s], "string"]; $a = array(); $s = "test"; if (array_key_exists($s, $a)) return [$a[$s], "string"]; What's wrong with this code? Edited May 21, 2016 by ballhogjoni Quote Link to comment Share on other sites More sharing options...
requinix Posted May 21, 2016 Share Posted May 21, 2016 You need PHP 5.4+ for short array syntax. Upgrade. 5.3 is dead. 5.4 is dead. Even 5.5 will be dead in a couple weeks. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.