ereg_replace for PHP 5.3 +?

前端 未结 2 923
别跟我提以往
别跟我提以往 2021-01-16 08:32

I\'ve seen a solution for not having to rework usage of the ereg function for PHP 5.3: Good alternative to eregi() in PHP

It uses if(!function_exists....

2条回答
  •  一向
    一向 (楼主)
    2021-01-16 09:20

    This line is now raising an exception, I suspect my web host has upgrade it's PHP installation.

    $vq = ereg_replace('[[:space:]]+', ' ', trim($vq));
    

    If I just switch to preg_replace it complains about the trailing +

    I was hoping for a quick fix, this was from an example I think from IBM.

提交回复
热议问题