ID: 9304 Updated by: andre Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: Scripting Engine problem Assigned To: Comments: no bug, it is simply not possible this way, only "var" and "function" language constructs are allowed directly withing class {} the only way I see is passing your class and methods through eval() Previous Comments: --------------------------------------------------------------------------- [2001-02-16 15:10:50] [EMAIL PROTECTED] this error happens on all these commands: include() include_once() require() require_once() --------------------------------------------------------------------------- [2001-02-16 14:55:07] [EMAIL PROTECTED] this error happens on all these commands: include() include_once() require() require_once() --------------------------------------------------------------------------- [2001-02-16 14:46:38] [EMAIL PROTECTED] in the documentation the following is noted: require() is not actually a function in PHP; rather, it is a language construct. It is subject to some different rules than functions are. For instance, require() is not subject to any containing control structures. I have found this statement ("not subject to any containing control structures") to NOT be true. I get an error for the following: class myclass() { require("myfile.php") }; I want to be able to include a function from another file that will become a method for the class. Any suggestions? --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9304&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]