Bug #42098 [Com]: E_STRICT doesn't trigger __autoload()
| From: | i at walkinraven dot name | Date: | Tue, 25 May 2010 09:12:20 +0000 |
| Subject: | Bug #42098 [Com]: E_STRICT doesn't trigger __autoload() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150791@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=42098&edit=1
ID: 42098
Comment by: i at walkinraven dot name
Reported by: nicolas dot grekas+php at gmail dot com
Summary: E_STRICT doesn't trigger __autoload()
Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: *
PHP Version: 5.2.3
New Comment:
I think autoload will not work in exception_handler or error_handler,
that is the problem.
Previous Comments:
------------------------------------------------------------------------
[2007-08-17 23:08:16] tony2001@php.net
>Ah ah ! You play with words :)
No, he just said the same thing in other words.
>The first time, you said :
>- "Only execute time errors can be caught with user error handler.",
>and now:
>- "during compile -> autoload wont be triggered"
There are two stages:
1) compile;
2) execute.
Compile-time errors cannot be caught, only execute-time errors can be.
>But that's still a bug for me in this case. My workaround does
>exactily what PHP internals should do automagically, nothing more !
This is how the things work.
------------------------------------------------------------------------
[2007-08-17 22:54:31] nicolas dot grekas+php at gmail dot com
Ah ah ! You play with words :)
The first time, you said :
- "Only execute time errors can be caught with user error handler.",
and now:
- "during compile -> autoload wont be triggered"
You was wrong the first time ! And you may be right the second time.
But that's still a bug for me in this case. My workaround does exactily
what PHP internals should do automagically, nothing more ! Please
consider it quietly, I'm not submitting this bug for fun. I do know the
workaround now. It's for others developpers around the world who enjoy
PHP a its best...
------------------------------------------------------------------------
[2007-08-17 22:40:32] jani@php.net
And that proves I'm right. __autoload() won't happen during compile.
And this error happens during compile -> autoload wont be triggered.
------------------------------------------------------------------------
[2007-08-17 22:37:41] nicolas dot grekas+php at gmail dot com
yes, with an include :
replace the eval with include 'toto.php', where toto.php contains
<?php
class A { function toto( ) {} }
class B extends A { function toto($a) {} }
?>
this is how I hit the bug the first time
------------------------------------------------------------------------
[2007-08-17 22:33:17] jani@php.net
Can you reproduce this without using eval() ?
------------------------------------------------------------------------
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=42098
--
Edit this bug report at http://bugs.php.net/bug.php?id=42098&edit=1