From: tobias dot bora at gmail dot com Operating system: servor linux, client windows PHP version: 5.2SVN-2009-12-08 (snap) PHP Bug Type: Unknown/Other Function Bug description: REGEX : probleme with $1
Description: ------------ Hello, I'm register at olympe-network.com, and when I put a regex send to the servor via http://www.spijoprod.net/outils/ftp_en_ligne/index.php, the regex : ###################################### #$chaine = preg_replace('#\[b\](.+)\[/b\]#i', '<strong>$1</strong>', #$chaine); ######################################## is transformed in : ###################################### #$chaine = preg_replace('#\[b\](.+)\[/b\]#i', #'<strong>/(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|var|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)([ #\.\"\'\{\(;&<])/g</strong>', $chaine); ###################################### It's the $1 that php don't like. Can you please repear this bug or tell me how can I use it ? Thanks ! PS : excuse me but my english isn't very well... Reproduce code: --------------- <?php function mezzocode($chaine) { /* GRAS */ $chaine = preg_replace('#\[b\](.+)\[/b\]#i', '<strong>/(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|var|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)([ \.\"\'\{\(;&<])/g</strong>', $chaine); return $chaine; } ?> -- Edit bug report at http://bugs.php.net/?id=50408&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50408&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50408&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50408&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50408&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50408&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50408&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50408&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50408&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50408&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50408&r=support Expected behavior: http://bugs.php.net/fix.php?id=50408&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50408&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50408&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50408&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50408&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50408&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50408&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50408&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50408&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50408&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50408&r=mysqlcfg
