#38121 [Opn->Bgs]: class is considered not defined before it is declared
| From: | helly@php.net | Date: | Mon, 17 Jul 2006 07:05:19 +0000 |
| Subject: | #38121 [Opn->Bgs]: class is considered not defined before it is declared | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99496@lists.php.net to get a copy of this message | ||
ID: 38121
Updated by: helly@php.net
Reported By: public at grik dot net
-Status: Open
+Status: Bogus
Bug Type: SPL related
Operating System: *
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-07-17 01:36:33] public at grik dot net
Description:
------------
I am not sure already what is it related to, but it's getting
interesting :)
The engine does not recognise the class that implements the ArrayAccess
interface as declared in the code written before the class declaration
is placed.
Reproduce code:
---------------
<?php
var_dump(class_exists('validatorCheck'));
class validatorCheck implements ArrayAccess {
function offsetGet($key){}
function offsetSet($key, $value) {}
function offsetUnset($key) {}
function offsetExists($offset) {}
//class end
}
var_dump(class_exists('validatorCheck'));
?>
Expected result:
----------------
bool(true)
bool(true)
Actual result:
--------------
bool(false)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38121&edit=1