php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45633 class_exists return nothing and die script
Submitted: 2008-07-26 20:48 UTC Modified: 2008-07-26 21:09 UTC
From: alexmontoanelli at gmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexmontoanelli at gmail dot com
New email:
PHP Version: OS:

 

 [2008-07-26 20:48 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-26 21:09 UTC] lstrojny@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 04 05:01:32 2024 UTC