Aptana marks $ a = [..] as a syntax error

I am using Aptana Studio 3 and I have the following problem:

When I type:

$return = ['success' => (validation_errors() == null) ? true : false]; 

Aptana marks this line as a syntax error. Any ideas on how to fix this?

+5
source share
1 answer

Install the PHP version in Aptana for> = 5.4. The array syntax with [] instead of array() is relatively new and depending on the analyzer, it will show you a syntax error or not.

Right-click on your project and go to "Properties". Then click on the “PHP Development” menu on the left and select “PHP 5.4.x” (or something similar)

+15
source

Source: https://habr.com/ru/post/1208580/


All Articles