note 29303 deleted from function.include by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:41:11 +0000 |
| Subject: | note 29303 deleted from function.include by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59782@lists.php.net to get a copy of this message | ||
Note Submitter: j.tevessen@gmx.net
----
Note that at least PHP 4.1.2 doesn't support "include"
or "require" within classes. Within a function it is fine,
but within a class it simply doesn't work.
So this here is broken:
test.inc:
function b() { }
test.php:
class SomeClass {
function a() { }
include 'test.inc';
function c() { }
}
PHP barks on the "include" keyword (same with "require").
You may want to have a look at this for backwards
compatibility.