note 73063 deleted from function.preg-replace by crell

From: Date: Fri, 01 Jul 2022 20:07:44 +0000
Subject: note 73063 deleted from function.preg-replace by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218876@lists.php.net to get a copy of this message
Note Submitter: dani dot church at gmail dot youshouldknowthisone ---- Note that it is in most cases much more efficient to use preg_replace_callback(), with a named function or an anonymous function created with create_function(), instead of the /e modifier. When preg_replace() is called with the /e modifier, the interpreter must parse the replacement string into PHP code once for every replacement made, while preg_replace_callback() uses a function that only needs to be parsed once.

« previous php.notes (#218876) next »