#45633 [Opn->Bgs]: class_exists return nothing and die script
ID: 45633
Updated by: lstrojny@php.net
Reported By: alexmontoanelli at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Linux
PHP Version: 5.2.6
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
First, there is a typo in your example ("funtion" instead of
"function"). Without the typo the example fails in the parsing stage and
class_exists() is never executed. Please check that the ini settings
display_errors is on.
Previous Comments:
------------------------------------------------------------------------
[2008-07-26 20:48:34] alexmontoanelli at gmail dot com
Description:
------------
I Have a Interface class, One normal class,
if the normal class do not have all interfaces methods implements,
an i call class_exists('my_normal_class_extends_interface'),
the script is die, and no value is retorned.
If the normal class have all methods defined, then work fine.
Sorry for bad english.
Reproduce code:
---------------
Interface myInterface {
public funtion foo();
}
class normalClass implements myInterface{}
var_dump(class_exists('normalClass'));
Expected result:
----------------
i exptec php Reporting a fatal error, because the first 'normalClass',
no implements all methods in interface myInterface
Actual result:
--------------
Php die, when call class_exists
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45633&edit=1
Thread (2 messages)