Re: [PHP4BETA] Upgrading!
| From: | Andrei Zmievski | Date: | Mon, 20 Sep 1999 21:42:03 +0000 |
| Subject: | Re: [PHP4BETA] Upgrading! | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-4711@lists.php.net to get a copy of this message | ||
AsianAvenue.com wrote:
> We are starting to mess around with PHP4 b2......our application API
> written entirely in PHP 3, fails on the following line:
>
> if ( ! EREG( "([^[:space:]]{$maxLength,})", $string ) ) {
> return $string ;
> }
>
> The error message is:
>
> Parse error: parse error, expecting `'}'' in
> /web/CCI/BP/phpinclude/Text/lib/utils.php on line 748
>
> We have written and deployed this in PHP 3.0.11. Any clues?
PHP 4 treats {} embedded in strings as containers for complex variables
references. In your case, just put \ in front of { and you'll be fine.
-Andrei
* Software never has bugs. It just develops random features. *