note 29303 added to function.include

From: Date: Sun, 09 Feb 2003 12:44:16 +0000
Subject: note 29303 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-43678@lists.php.net to get a copy of this message
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. -- http://www.php.net/manual/en/function.include.php http://master.php.net/manage/user-notes.php?action=edit+29303 http://master.php.net/manage/user-notes.php?action=delete+29303 http://master.php.net/manage/user-notes.php?action=reject+29303

« previous php.notes (#43678) next »