|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7469 Irregularity between 'identical' expressions
Submitted: 2000-10-25 19:06 UTC Modified: 2000-10-25 21:49 UTC
From: john at vbulletin dot com Assigned:
Status: Closed Package: *Regular Expressions
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: john at vbulletin dot com
New email:
PHP Version: OS:


 [2000-10-25 19:06 UTC] john at vbulletin dot com

echo eregi_replace("([^\n\r \\./<>\"\\-]{$wordwrap})"," \\1 ","$1000");
// outputs $100 0

echo eregi_replace("([^\n\r \\./<>\"\\-]{".$wordwrap."})"," \\1 ","$1000");
//outputs $1000


For output, see:

I'm not sure what else you need. I can provide most things.

PHP Info:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-25 21:49 UTC]
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...
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 01:05:53 2022 UTC