dsdzz04802 2012-12-31 12:53
浏览 68
已采纳

如何在Aptana IDE中显示未定义的php变量通知?

How is it possible to see notices about undefined variables in the problem window of Aptana?

I want to write clean source code and the hint for PHP notice is important for me, at first in the IDE and less in the running application as it's already "too late".

Maybe Aptana has an option to activate this to see the PHP notices, not only error and warnings?

See my screenshot, maybe its easier to understand my question. On this screen I will see PHP notices, warnings and errors. enter image description here

A example of code, that create a PHP notice in webapp, in browser:

<?php

echo $undefined_var;

The var is not defined and result in this notice message:

Notice: Undefined variable: undefined_var in /var/www/wp-plugins/my-test.php on line 3

  • 写回答

2条回答 默认 最新

  • duancai9010 2012-12-31 13:44
    关注

    AFAIK Aptana (and also other Eclipse PHP editor plugins like PDT) do not report Undefined Variable warning / notices for the Problems view.

    PHP itself gives this notice only, when the code is executed. So an IDE must also somewhat "execute" the code or do a more high-level static code analysis to report these kind of problems.

    An IDE I know of that does this is Phpstorm, which is very good with the static code analysis part.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 matlab实现基于主成分变换的图像融合。
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊