| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2010-08-20 07:11 UTC] aharvey@php.net
 
-Status: Open
+Status: Bogus
  [2010-08-20 07:11 UTC] aharvey@php.net
  [2010-08-20 17:53 UTC] augusteiner at hotmail dot com
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 04:00:01 2025 UTC | 
Description: ------------ A class that implements an interface should implement interface's methods, but a method inside that class with type hint of class that implements the interface would be accepted. Or not!? After all, both are hierarchically identical. Test script: --------------- interface IEntity { public function equals(IEntity $other); } class Entity implements IEntity { public function equals(Entity $other) { return $this === $other; } } Actual result: -------------- Fatal error: Declaration of Entity::equals() must be compatible with that of IEntity::equals() in C:\wamp\www\horusweb\models\Coded.class.php