Doc #62969 [Opn]: Documentation does not mention is_subclass_of() change of behavior in 5.3.9

From: Date: Wed, 29 Aug 2012 13:33:44 +0000
Subject: Doc #62969 [Opn]: 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-8790@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 User updated by: ar at ez dot no Reported by: ar at ez dot no -Summary: Documentation does not mention change of behavior in 5.3.9 caused by is_a chang +Summary: Documentation does not mention is_subclass_of() change of behavior in 5.3.9 Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Any PHP Version: Irrelevant Block user comment: N Private report: N New Comment: ( Updated Summary ) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#8790) next »