[pmwiki-users] Recipes you use/need to be updated for PHP 5.5

John Rankin john.rankin at affinity.co.nz
Sat Jan 4 16:26:16 CST 2014

> John Rankin writes:
>> > If you maintain recipes on the cookbook and wish to update your
>> recipe,
>> > see
>> >   http://www.pmwiki.org/wiki/PmWiki/CustomMarkup#php55
>> I also have a lot of code that needs to be changed to use
>> preg_replace_callback instead of preg_replace with /e. Sigh.
> You can read the helper PCCF() ie. "PmWiki Create Callback Function" in
> pmwiki.php, which may help you migrate. It was also added in 2.2.56.

By my reading of the link above, all calls to Markup with a /e modifier
will stop working under 2.2.56, yes?

Given the size of the task, I was planning to fix and test all the calls
to preg_replace with a /e first (which won't require a pmwiki upgrade),
then work on the Markup calls (which will). So it looks as if it would be
useful to make a temporary copy of the PCCF() function in my cookbook/.

In a lot of cases, I'm going to need the 'use' keyword to pass parameters
to the callback function.

John Rankin

More information about the pmwiki-users mailing list