php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #34455 class_implements and class_parents
Submitted: 2005-09-10 14:44 UTC Modified: 2005-09-12 15:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jumo at gmx dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: debian gnu/linux
Private report: No CVE-ID: None
 [2005-09-10 14:44 UTC] jumo at gmx dot de
Description:
------------
Hi,

why aren't the functions class_implements and class_parents here:

http://www.php.net/manual/en/ref.classobj.php

2nd: the documentation of class_implements reads

class_implements --  Return the interfaces which are implemented by the given class

but it should be changed to something like:

class_implements --  Return the interfaces which are implemented by the given class and its parent classes.

Reproduce code:
---------------
<?php

interface A {}

interface B {}

class C implements A {}

class D extends C implements B  {}

class E extends D {}

$e = new E;

print_r( class_implements( $e ));

?>

Expected result:
----------------
Array()

Actual result:
--------------
 Array (     [A] => A     [B] => B )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-11 13:29 UTC] jumo at gmx dot de
and the search is not helpfull:

http://www.php.net/manual-lookup.php?pattern=interface
 [2005-09-12 15:09 UTC] vrana@php.net
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.

1. They are part of SPL thus they are under SPL.

2. I've mentioned parents in the function description.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 23:00:03 2025 UTC