1 頁 (共 1 頁)

PHP 5.5

發表於 : 2015-05-23 16:49:46
yehlu
http://forums.yessoftware.com/posts.php?post_id=122982

Downgrade to PHP 5.4.24 or Set your templates

I don't have tried but I think it's also possible to use php function_exists() to check if preg_replace() is implementend in your PHP environment.
Something like this pseudo-code:

if (! function_exists('preg_replace')) {
include 'my_preg_replace.php';
}
?

File my_preg_replace.php should be like this:

function preg_replace($pattern, $replacement, $subject, $limit, $count){
// custom implementation by using php 5.5 preg_replace_callback if you
// are using PHP 5.5.

}