Bug #11835: Include and Require does not work inner a class definition.

From: Date: Mon, 02 Jul 2001 13:14:58 +0000
Subject: Bug #11835: Include and Require does not work inner a class definition.
Groups: php.dev 
Request: Send a blank email to php-dev+get-58689@lists.php.net to get a copy of this message
From: developer@libero.it Operating system: win nt 4 PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: Include and Require does not work inner a class definition. Require nor Include works inner a class file. This is the file where I define the class: ===== 1.php ===== <? class test { include("2.php"); //the same with require } ?> ===== end ===== And this is the file where I have content. ===== 2.php ===== <? var $a=1; function method1 () { $this->a++; } ?> ===== end ===== This does not work. The error is: ======== Parse error: parse error, expecting T_OLD_FUNCTION' or T_FUNCTION' or T_VAR' or '}'' ======== -- Edit Bug report at: http://bugs.php.net/?id=11835&edit=1

« previous php.dev (#58689) next »