|
Posted by Colin Fine on 12/07/05 02:18
comp.lang.php wrote:
> Oh, one more thing: I replaced '\\1 ' with '$1' to prove that that
> could not have been the cause of the T_DNUMBER error:
>
> [PHP]
> // FIND THE PATTERN OF THE OLD VERSION
> $pattern='`^(\s*\*\s+\@version)\s*('.
> str_replace('/','\\/',preg_quote($oldversion)).')(.*)$`i';
> $contents = preg_replace($pattern, '$1 ' . $newversion . '$2',
> $contents);
> [/PHP]
>
> No errors! Even this produced no errors:
>
Justin told you the answer to that: the /e qualifier (that you're no
longer using). That qualifier means 'treat the pattern as a PHP
expression, and evaluate it'.
Colin
[Back to original message]
|