php - Eclipse中的PHP 7调试器设置

原文 标签 php eclipse eclipse-pdt php-7

PHP 7 debugger settings in eclipse

I've changed the version of php from 5.6 to the new version: 7.0. So far, everything works fine; but some new features of php 7 are not recognized by the debugger. For example the line:

$flag = $params['flag'] ?? true;

is marked by the debugger - symbol ? not recognized, but when I run the program it is working correctly!

What can I do to fix this?


Version of PDT released with Eclipse Mars supports all major PHP 7 features. Your example is about Null Coalesce Operator ( and it is ready to use with PDT.

To remove error in PHP editor go to your project preferences (context menu in PHP Explorer) and choose PHP -> Interpreter and change it to PHP 7.


到目前为止,一切正常。但是调试器无法识别php 7的某些新功能。例如一行:

$flag = $params['flag'] ?? true;


与Eclipse Mars一起发布的PDT版本支持所有主要的PHP 7功能。您的示例与Null Coalesce运算符(有关,可以将其与PDT一起使用。

要消除PHP编辑器中的错误,请转到项目首选项(PHP Explorer中的上下文菜单),然后选择PHP-> Interpreter并将其更改为PHP 7。

javascript - 访问URL参数-PHP和Angular.js

php - 使用更新的MySQL库修复PHP数据库连接失败

php - PHP代码不允许多个输入值通过我的表单发送

php - Laravel 5.1内部联接查询中的问题

php - 控制PHP ldap分页-结果数和页码

php - 带有PHPStorm 10的PHP7

php - 如何防止第二个正则表达式重新替换?

php - 如何在PHP的$ _SESSION中保存值并进行检索

php - 与特质的定义顺序和内容有关的“未找到特质错误”

php - 按费用和名称对数组进行排序