|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17952 is_a returns false if class is a superclass of the object.
Submitted: 2002-06-24 14:00 UTC Modified: 2002-09-11 11:25 UTC
From: sven at devcon dot net Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.2.1 OS: Linux
Private report: No CVE-ID: None
 [2002-06-24 14:00 UTC] sven at devcon dot net
is_a() behaves like

  return get_class($object) == strtolower($class);

but should behave like

  return get_class($object) == strtolower($class) ||
                   is_subclass_of($object, $class);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 12:05 UTC] sven at devcon dot net
I can give a copy of the commercial application where this happens to the php-developer who wants to fix this bug.

Best regards,
 [2002-07-03 20:25 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 09:01:27 2023 UTC