ID:          20242
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:      Open
 Bug Type:    Scripting Engine problem
 PHP Version: 4CVS-2002-11-04
 New Comment:

Huh? It just works for me.
Hmm I'm rather interested in what causes it to fail in your
environment.



Previous Comments:
------------------------------------------------------------------------

[2002-11-04 05:17:21] [EMAIL PROTECTED]

While you can call functions in front or after current code you cannot
do so with classes. As this is documented nowhere this is an error with
both ZE1 and ZE2.

Following .phpt file:
====================================
--TEST--
Method call infront of class definition
--FILE--
<?php

test::show_static();

$t = new test;
$t->show_method();

class test {
        function show_static() {
                echo "static\n";
        }
        function show_method() {
                echo "method\n";
        }
}
?>
--EXPECT--
static
method 
=EOF================================

Produces following .out
====================================
<font color=ff0000>
Fatal error: Class 'test' not found in
/usr/src/php4-HEAD/tests/classes/classes001.php on line 3
</font>/usr/src/php4-HEAD/tests/classes/classes001.php(3) : Fatal error
- Class 'test' not found
=EOF================================


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20242&edit=1

Reply via email to