note 115708 added to simplexml.examples-errors

From: Date: Thu, 11 Sep 2014 21:29:02 +0000
Subject: note 115708 added to simplexml.examples-errors
Groups: php.notes 
Request: Send a blank email to php-notes+get-200419@lists.php.net to get a copy of this message
Now that the /e modifier is considered deprecated in preg_replace, you can use a negative lookahead to replace unescaped ampersands with & without throwing warnings: $str = preg_replace('/&(?!;{6})/', '&', $str); You probably should have been doing this before /e was deprecated, actually. ---- Server IP: 64.71.164.2 Probable Submitter: 96.233.109.34 ---- Manual Page -- http://php.net/manual/en/simplexml.examples-errors.php Edit -- https://master.php.net/note/edit/115708 Del: integrated -- https://master.php.net/note/delete/115708/integrated Del: useless -- https://master.php.net/note/delete/115708/useless Del: bad code -- https://master.php.net/note/delete/115708/bad+code Del: spam -- https://master.php.net/note/delete/115708/spam Del: non-english -- https://master.php.net/note/delete/115708/non-english Del: in docs -- https://master.php.net/note/delete/115708/in+docs Del: other reasons-- https://master.php.net/note/delete/115708 Reject -- https://master.php.net/note/reject/115708 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200419) next »