Req #52517 [Csd]: E_COMPILE_WARNING is not
| From: | kalle@php.net | Date: | Tue, 17 Aug 2010 19:55:46 +0000 |
| Subject: | Req #52517 [Csd]: E_COMPILE_WARNING is not | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153535@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52517&edit=1
ID: 52517
Updated by: kalle@php.net
Reported by: david at grudl dot com
Summary: E_COMPILE_WARNING is not
Status: Closed
Type: Feature/Change Request
Package: Compile Warning
PHP Version: 5.3.3
Assigned To: kalle
-Block user comment: N
+Block user comment: Y
New Comment:
There is alot of difference between them. Using your example code the
declare statement is hit at compile time, so before the the executor is
triggered that hooks into the error handler the warning is already
thrown. Same things goes for includes, although they are as you rightly
put it, executed at runtime. This is how the Zend Engine is designed
and not going to change.
Previous Comments:
------------------------------------------------------------------------
[2010-08-17 21:47:22] david at grudl dot com
There is not difference between compile time or execution time.
Compilation is invoked by "include" or "require" or "eval" in run
time.
So statements "require" throw E_COMPILE_WARNING and you cannot handle
them using user-defined error handler.
------------------------------------------------------------------------
[2010-08-17 20:20:11] kalle@php.net
Yes it is, as declare is evaluated at compile time, not execution time
hence its not possible to catch the warning anyway as its thrown before
the executor is hit.
------------------------------------------------------------------------
[2010-08-17 18:43:36] david at grudl dot com
It is not about declare struct, it is about handing warnings & notices
by user-handler (and logging them e.g.). I am unable to catch and log
this warning. Please re-open this issue.
------------------------------------------------------------------------
[2010-08-16 21:42:34] kalle@php.net
The declare struct have meaning for the script at compile time, not
execution time hence its an E_COMPILE_WARNING.
------------------------------------------------------------------------
[2010-08-02 18:54:03] david at grudl dot com
"run-time error" -> "runtime warning"
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=52517
--
Edit this bug report at http://bugs.php.net/bug.php?id=52517&edit=1