From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      4CVS-2002-11-04
PHP Bug Type:     Scripting Engine problem
Bug description:  Method call infront of class definition

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 bug report at http://bugs.php.net/?id=20242&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20242&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20242&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20242&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20242&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20242&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20242&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20242&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20242&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20242&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20242&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20242&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20242&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20242&r=isapi

Reply via email to