Bug #64504 [Opn]: Forward reference of a class with interface

From: Date: Mon, 25 Mar 2013 08:10:43 +0000
Subject: Bug #64504 [Opn]: Forward reference of a class with interface
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-178059@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64504&edit=1 ID: 64504 Updated by: krakjoe@php.net Reported by: rstoll at tutteli dot ch Summary: Forward reference of a class with interface Status: Open Type: Bug Package: Class/Object related PHP Version: 5.4.13 Block user comment: N Private report: N New Comment: I concur. Previous Comments: ------------------------------------------------------------------------ [2013-03-25 06:36:50] laruence@php.net always declare before use(or use autoload mechanism)... this is the current implementation, I don't think it's need to be fixed. ------------------------------------------------------------------------ [2013-03-24 15:56:15] rstoll at tutteli dot ch Description: ------------ My PHP version is 5.4.7 forward references of classes do not work if the class implements an interface. Test script: --------------- $a = new Ok(); //that's ok class OK{} $a = new Fail(); //fails interface I{} class Fail implements I{} Expected result: ---------------- I would expect that forward references are also supported for classes which implement an interface ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64504&edit=1

« previous php.bugs (#178059) next »