[PHP-DEV] Bug #11836 Updated: Require nor Include works inner a class file
ID: 11836 Updated by: derick Reported By: [EMAIL PROTECTED] Status: Open Old-Bug Type: Scripting Engine problem Bug Type: Feature/Change Request Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Not a bug, this was never supposed to work. making this a feature request. Derick Previous Comments: --- [2001-07-02 09:39:39] [EMAIL PROTECTED] Require nor Include works inner a class file. I have 200+ classes that have a common declaration of variables and methods. Everytime I need to modify this declarations I have to modify this 200+ files. If I could use require or include there I had only one file to modify. This is the file where I define the class, it's only a LITTLE example: = class_test.php = ? class test { var $b=0; var $c=1; function test() { //this is the constructor //some code here } include(common_declarations.php); //same with require } ? end And this is the file where I have the common declarations for 200+ files. = common_declarations.php = ? var $common_variable1=1; function common_method1 () { $this-b++; } function common_method2 ($p=1) { $this-b=$p; } //etc ? = end = This does not work, the error is: Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11836edit=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]
[PHP-DEV] Bug #11836 Updated: Require nor Include works inner a class file
ID: 11836 Updated by: cardinal Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Why don't you move your common variables and methods to a separate class, and have your 200 classes extend it? Previous Comments: --- [2001-07-02 09:41:47] [EMAIL PROTECTED] Not a bug, this was never supposed to work. making this a feature request. Derick --- [2001-07-02 09:39:39] [EMAIL PROTECTED] Require nor Include works inner a class file. I have 200+ classes that have a common declaration of variables and methods. Everytime I need to modify this declarations I have to modify this 200+ files. If I could use require or include there I had only one file to modify. This is the file where I define the class, it's only a LITTLE example: = class_test.php = ? class test { var $b=0; var $c=1; function test() { //this is the constructor //some code here } include(common_declarations.php); //same with require } ? end And this is the file where I have the common declarations for 200+ files. = common_declarations.php = ? var $common_variable1=1; function common_method1 () { $this-b++; } function common_method2 ($p=1) { $this-b=$p; } //etc ? = end = This does not work, the error is: Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11836edit=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]
[PHP-DEV] Bug #11836 Updated: Require nor Include works inner a class file
ID: 11836 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating system: ms nt 4 PHP Version: 4.0.4pl1 Description: Require nor Include works inner a class file It's a good idea. Thank you. I still hope that require and include will works innner class declaration in future. Previous Comments: --- [2001-07-02 10:24:46] [EMAIL PROTECTED] Why don't you move your common variables and methods to a separate class, and have your 200 classes extend it? --- [2001-07-02 09:41:47] [EMAIL PROTECTED] Not a bug, this was never supposed to work. making this a feature request. Derick --- [2001-07-02 09:39:39] [EMAIL PROTECTED] Require nor Include works inner a class file. I have 200+ classes that have a common declaration of variables and methods. Everytime I need to modify this declarations I have to modify this 200+ files. If I could use require or include there I had only one file to modify. This is the file where I define the class, it's only a LITTLE example: = class_test.php = ? class test { var $b=0; var $c=1; function test() { //this is the constructor //some code here } include(common_declarations.php); //same with require } ? end And this is the file where I have the common declarations for 200+ files. = common_declarations.php = ? var $common_variable1=1; function common_method1 () { $this-b++; } function common_method2 ($p=1) { $this-b=$p; } //etc ? = end = This does not work, the error is: Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' --- Full Bug description available at: http://bugs.php.net/?id=11836 -- 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]
[PHP-DEV] Bug #11836 Updated: Require nor Include works inner a class file
ID: 11836 Updated by: cynic Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Suspended Bug Type: Feature/Change Request Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: yes, actual knowledge of the coding technics one uses never did any harm. I'll leave this suspended as it's a featrue request (and not very likely to get satisfied) Previous Comments: --- [2001-07-02 10:53:29] [EMAIL PROTECTED] It's a good idea. Thank you. I still hope that require and include will works innner class declaration in future. --- [2001-07-02 10:24:46] [EMAIL PROTECTED] Why don't you move your common variables and methods to a separate class, and have your 200 classes extend it? --- [2001-07-02 09:41:47] [EMAIL PROTECTED] Not a bug, this was never supposed to work. making this a feature request. Derick --- [2001-07-02 09:39:39] [EMAIL PROTECTED] Require nor Include works inner a class file. I have 200+ classes that have a common declaration of variables and methods. Everytime I need to modify this declarations I have to modify this 200+ files. If I could use require or include there I had only one file to modify. This is the file where I define the class, it's only a LITTLE example: = class_test.php = ? class test { var $b=0; var $c=1; function test() { //this is the constructor //some code here } include(common_declarations.php); //same with require } ? end And this is the file where I have the common declarations for 200+ files. = common_declarations.php = ? var $common_variable1=1; function common_method1 () { $this-b++; } function common_method2 ($p=1) { $this-b=$p; } //etc ? = end = This does not work, the error is: Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11836edit=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]