#41935 [Opn]: preg_replace: there is an error in "Example 1698. Using the 'e' modifier".

From: Date: Mon, 09 Jul 2007 15:16:05 +0000
Subject: #41935 [Opn]: preg_replace: there is an error in "Example 1698. Using the 'e' modifier".
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969376996@lists.php.net to get a copy of this message
ID: 41935 Updated by: bjori@php.net Reported By: noone at nowhere dot com Status: Open -Bug Type: Website problem +Bug Type: Documentation problem PHP Version: Irrelevant New Comment: Reclassified as documentation problem Previous Comments: ------------------------------------------------------------------------ [2007-07-09 10:49:52] noone at nowhere dot com Description: ------------ There is an error in "Example 1698. Using the 'e' modifier". Either single quotes or additional escapes should be used imho: <?php preg_replace("/(<\\/?)(\\w+)([^>]*>)/e", "'\\1'.strtoupper('\\2').'\\3'", $html_body); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41935&edit=1

« previous php.doc (#969376996) next »