PHP 8.5.0 Alpha 2 available for testing

Voting

: min(seven, nine)?
(Example: nine)

The Note You're Voting On

tuxedobob
10 years ago
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.

<< Back to user notes page

To Top