Doc #62969 [Opn->Csd]: Documentation does not mention is_subclass_of() change of behavior in 5.3.9
| From: | googleguy@php.net | Date: | Thu, 30 Aug 2012 03:26:06 +0000 |
| Subject: | Doc #62969 [Opn->Csd]: Documentation does not mention is_subclass_of() change of behavior in 5.3.9 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8792@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62969&edit=1
ID: 62969
Updated by: googleguy@php.net
Reported by: ar at ez dot no
Summary: Documentation does not mention is_subclass_of()
change of behavior in 5.3.9
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: googleguy
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2012-08-30 03:17:13] googleguy@php.net
Automatic comment from SVN on behalf of googleguy
Revision: http://svn.php.net/viewvc/?view=revision&revision=327374
Log: Added change log entry for is_subclass_of() behavior change using interfaces and new example to
demonstrate. Fixes Bug #62969.
------------------------------------------------------------------------
[2012-08-29 13:33:43] ar at ez dot no
( Updated Summary )
------------------------------------------------------------------------
[2012-08-29 13:31:57] ar at ez dot no
Description:
------------
---
From manual page: http://www.php.net/function.is-subclass-of#refsect1-function.is-
subclass-of-changelog
---
The documentation should somehow make the reader aware that is_subclass_of did not
work reliable with interfaces before 5.3.9 when https://bugs.php.net/bug.php?
id=53727 and https://bugs.php.net/bug.php?id=55475 where fixed.
It should maybe point the reader to class_implements() for a way to realiable
check that a class name (string) implements a given interface.
Test script:
---------------
<?php
interface MyInterface {}
class MyClass implements MyInterface {}
// This will fail on 5.3.8 and earlier, this has been fixed
// in #53727, but doc does not reflect that.
echo (is_subclass_of('MyClass', 'MyInterface') ? 'true' :
'false');
Expected result:
----------------
true
Actual result:
--------------
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62969&edit=1