集锦标志着$ a = [..]作为语法错误 [英] Aptana marks $a = [..] as a syntax error

查看:188
本文介绍了集锦标志着$ a = [..]作为语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Aptana Studio的3,我有以下问题:

I'm using Aptana Studio 3 and I have the following problem:

当我键入:

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

标记集锦这条线作为一个语法错误。
关于如何解决这个任何想法?

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

推荐答案

在集锦为> = 5.4设置你的PHP版本。用[],而不是数组语法阵列()是相对较新,这取决于解析器它会告诉你一个语法错误或没有。

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

在你的项目上右键单击并选择属性。然后点击左侧的PHP开发菜单,然后选择PHP 5.4.x版本(或类似的东西)

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

这篇关于集锦标志着$ a = [..]作为语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆