php 5 bug?
| From: | Nuno Lopes | Date: | Thu, 22 Jan 2004 16:05:20 +0000 |
| Subject: | php 5 bug? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-7277@lists.php.net to get a copy of this message | ||
Hello,
I don't know if this is a bug or a feature, but... The code below works with
PHP 4, but gives an error in PHP 5.
Nuno
--------------------------------
<?php
$test = new test();
$test->func();
class test
{
function func() {
echo 'test';
}
}
?>
-------------------
PHP 4:
test
-------------------
PHP 5:
Fatal error: Class 'test' not found in C:\...\bug.php on line 2