[pmwiki-users] Deprecated preg_replace() eval feature in PHP 5.5
eforgeot at gmail.com
Wed Oct 23 10:03:41 CDT 2013
Does this concern all markup rules, or only markup in pmwiki with the
/e switch? (I guess it's the later, but I wanted to be sure)
so Markup("'*", "inline", "/'\\*(.*?)\\*'/", "<b>$1</b>"); # '*bold*'
will remain the same?
2013/9/27 Petko Yotov <5ko at 5ko.fr>:
> John Rankin writes:
>> On 21/09/13 10:59 AM, Petko Yotov wrote:
>>> A few new functions were added:
>>> PCCF() PmWiki Create Callback Function
>>> PPRE() PmWiki preg_replace eval
>>> PPRA() PmWiki preg_replace arrays
>>> Markup_e() like Markup() but with replacement evaluated in a Callback
>>> We'll document these functions once we're sure they work like we want
>>> them to work.
>> If a recipe uses preg_replace with an e modifier directly in its code, is
>> there a pmwiki-recommended way to use the new pmwiki functions and/or
>> replace the preg_replace calls with suitable preg_replace_callback?
> The helper functions above will make it easier but using these functions
> will not be required. A recipe needed to run with in PHP 5.5 could rewrite
> the snippets like the examples here:
> You need to be carefull with the scope of the internal variables used in the
> replacement (this also applies with our helper functions) and with the
> callback declaration, as some ways require PHP 5.3.
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
More information about the pmwiki-users