#27440 [Opn]: typo at snaps.php.net
| From: | derick@php.net | Date: | Sun, 29 Feb 2004 23:42:36 +0000 |
| Subject: | #27440 [Opn]: typo at snaps.php.net | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-55711@lists.php.net to get a copy of this message | ||
ID: 27440
Updated by: derick@php.net
Reported By: holliwell at gmx dot net
Status: Open
Bug Type: Class/Object related
Operating System: linux 2.4.20 RH8
PHP Version: 5CVS-2004-02-29 (dev)
New Comment:
It is required if you use inheritance and interfaces, so I think it
should stay like this. declaring classes after using them is IMO not
really nice (and afaik it can hurt some performance), so I think we
should keep advising not to do this.
Previous Comments:
------------------------------------------------------------------------
[2004-02-29 18:35:22] holliwell at gmx dot net
Description:
------------
Hi,
README.PHP4-TO-PHP5-THIN-CHANGES states that classes must be declared
before used. That seems no longer to be true.
Reproduce code:
---------------
<?php
$test = new fubar();
$test->barfu();
class fubar {
function barfu()
{
echo 'fubar';
}
}
?>
Expected result:
----------------
Fatal error: Class 'fubar' not found in ....
Actual result:
--------------
fubar
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27440&edit=1