PHP调试 [英] PHP debugging

查看:63
本文介绍了PHP调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP有一些非常时髦的错误消息:


解析错误,意外T_IF;

"解析错误:解析错误,意外T_CONSTANT_ENCAPSED_STRING" ;;


人们经常看到这些 - 它们不应该更具人性化吗?


....为什么没有堆栈回溯?


出现问题时,我经常有兴趣知道

问题代码的调用位置。


好​​像用PHP - 我需要第三方调试工具如果我想要获取这些信息: - |

-

__________

| im | yler http://timtyler.org / ti*@tt1lock.org 删除锁定以回复。

PHP has some pretty funky error messages:

"parse error, unexpected T_IF";
"Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING";

Humans often see these - shouldn''t they be more human readable?

....and why are there no stack backtraces?

When a problem arises, I am often interested in knowing where the
problem code was called from.

It seems as though - with PHP - I need third-party debugging tools if I
want to access this information :-|
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.

推荐答案

Tim Tyler< ti*@tt1lock.org>编写或引用:
Tim Tyler <ti*@tt1lock.org> wrote or quoted:
PHP有一些非常时髦的错误信息:

解析错误,意外的T_IF;
解析错误:解析错误,意外T_CONSTANT_ENCAPSED_STRING" ;;

人们经常看到这些 - 它们不应该更具人性化吗?
PHP has some pretty funky error messages:

"parse error, unexpected T_IF";
"Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING";

Humans often see these - shouldn''t they be more human readable?




嘿:差点忘了我的最爱之一:


"解析错误:解析错误,意外



Heh: almost forgot one of my favourites:

"Parse error: parse error, unexpected


结束>


为了PHP的作者的利益,我会将自己的格式翻译成一个人类可读的格式:


" PHP解析器出乎意料地遇到了文件的结尾 - 而且

拒绝进一步努力找出问题

实际上是什么 - 所以你必须要自己跟踪问题。

-

__________

| im | yler http://timtyler.org/ ti*@tt1lock.org 删除锁定以回复。
end"

For the benefit of PHP''s authors, I''ll translate that one into a more
human-readable format myself:

"The PHP parser unexpectedly encountered the end of the file - and it
refuses to make any further effort to find out where the problem
actually is - so you''ll have to track the problem down yourself."
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.


尽管多年来一直是程序员,但我从来没有能够理解需要这些令人困惑的错误消息。 PHP中的一些消息

真是令人震惊。


就好像有些程序员因为出错而得到某种嗡嗡声

消息尽可能神秘。显然,术语普通英语

不属于他们的词汇量。


汉密尔顿

Tim Tyler < ti*@tt1lock.org>在消息新闻中写道:I3 ******** @ bath.ac.uk ...
Despite having been a programmer for many years, I have never been able to
understand the need for such confusing error messages. Some of the messages
in PHP are real shockers.

It is as if some programmers get some sort of buzz out of making error
messages as cryptic as humanly possible. Clearly the term "plain english" is
not part of their vocabulary.

Hamilton
"Tim Tyler" <ti*@tt1lock.org> wrote in message news:I3********@bath.ac.uk...
Tim Tyler< ti*@tt1lock.org>编写或引用:
Tim Tyler <ti*@tt1lock.org> wrote or quoted:
PHP有一些非常时髦的错误信息:

解析错误,意外的T_IF;
解析错误:解析错误,意外T_CONSTANT_ENCAPSED_STRING" ;;

人们经常看到这些 - 他们不应该更具人性化吗?
PHP has some pretty funky error messages:

"parse error, unexpected T_IF";
"Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING";

Humans often see these - shouldn''t they be more human readable?



嘿:几乎忘记了我最喜欢的一个:

"解析错误:解析错误,意外



Heh: almost forgot one of my favourites:

"Parse error: parse error, unexpected


这篇关于PHP调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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