#28952 [NEW]: class_exists() still calls __autoload()
| From: | jonathan dot hawk at hungrywolf dot net | Date: | Mon, 28 Jun 2004 20:08:11 +0000 |
| Subject: | #28952 [NEW]: class_exists() still calls __autoload() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-61451@lists.php.net to get a copy of this message | ||
From: jonathan dot hawk at hungrywolf dot net
Operating system: Windows 2000
PHP version: 5CVS-2004-06-28 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: class_exists() still calls __autoload()
Description:
------------
There is another bug report for this issue marked closed:
http://bugs.php.net/bug.php?id=28333
I pulled the latest Dev copy of PHP5 and noticed this bug is still around.
Is this expected behavior for class_exists? To try to include a
non-existant class? That doesn't seem right to me.
Reproduce code:
---------------
function __autoLoad( $class ) {
echo "I want to load $class<br />";
}
if ( !class_exists("iAmNotHere") ) {
echo "Class doesn't exist<br />";
}
Expected result:
----------------
Class doesn't exist
Actual result:
--------------
I want to load myClass
Class doesn't exist
--
Edit bug report at http://bugs.php.net/?id=28952&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28952&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28952&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28952&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28952&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28952&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28952&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28952&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28952&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28952&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28952&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28952&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28952&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28952&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28952&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28952&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28952&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28952&r=float