#37753 [Opn->Bgs]: Classes implementing interfaces may not be initiated before declaration
| From: | derick@php.net | Date: | Thu, 08 Jun 2006 21:26:10 +0000 |
| Subject: | #37753 [Opn->Bgs]: Classes implementing interfaces may not be initiated before declaration | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98212@lists.php.net to get a copy of this message | ||
ID: 37753
Updated by: derick@php.net
Reported By: rollercoaster397 at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Any
PHP Version: 5.1.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2006-06-08 21:20:31] rollercoaster397 at gmail dot com
Description:
------------
When a Class implements an interface, the class may not be initialized
before the declaration of this class.
Reproduce code:
---------------
$test = new Test;
echo $test;
interface Something {
function increment ();
}
class Test implements Something {
public $value = 0;
function increment () {
$this->value++;
return $this->value;
}
}
Expected result:
----------------
Object id #1
Actual result:
--------------
Fatal error: Class 'Test' not found in *path*/testcast.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37753&edit=1