PHP 4.0 Bug #7469 Updated: Irregularity between 'identical' expressions
| From: | joey@php.net | Date: | Thu, 26 Oct 2000 01:49:12 +0000 |
| Subject: | PHP 4.0 Bug #7469 Updated: Irregularity between 'identical' expressions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36033@lists.php.net to get a copy of this message | ||
ID: 7469
Updated by: joey
Reported By: john@vbulletin.com
Status: Closed
Bug Type: *Regular Expressions
Assigned To:
Comments:
This is bcz of the special treatment that the "{$variable}"
construct has in PHP. Here's how the statement looks by the
time the regex parser gets ahold of it:
([^\n\r \\./<>\"\\-]100)
Which is going to replace "$1000" with " $100 0", as you
asked it to...
Previous Comments:
---------------------------------------------------------------------------
[2000-10-25 19:06:17] john@vbulletin.com
<?
$wordwrap="100";
echo eregi_replace("([^nr \./<>"\-]{$wordwrap})"," \1
","$1000");
// outputs $100 0
echo eregi_replace("([^nr \./<>"\-]{".$wordwrap."})"," \1
","$1000");
//outputs $1000
?>
For output, see:
http://linux1371.dn.net/test.php
I'm not sure what else you need. I can provide most things.
PHP Info:
http://linux1371.dn.net/phpinfo.php
Thanks,
John
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7469