Bug: Isn´t it possible to use require/include to add methods to classes????
| From: | André Langhorst | Date: | Fri, 12 May 2000 08:38:29 +0000 |
| Subject: | Bug: Isn´t it possible to use require/include to add methods to classes???? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14876@lists.php.net to get a copy of this message | ||
Hi,
I tried to require/include (tried both) a file containg a simple function, which will be used in many different scripts/functions.
This functions extends in this case several classes by an unique method, they all can use. I found out that it´s even uninteresting if the file really exists or not. No "file not found" error is thrown. Requiring from the main script, outside any classes works and if a file isn´t existent an error occurs.
I got this error:
Parse error: parse error, expecting
T_OLD_FUNCTION' or T_FUNCTION' or T_VAR' or '}'' in class.db.php on line 98
cut&paste worked without problems, external file is enclosed in <? ?> tags, otpimizer isn´t activated, no old .dlls, everything´s fine, almost.
I´ve encountered this error on Win2000 RC2 (build from yesterday) and on Linux RC1
andré