I need a little help. Because In preg_replace /e is deprecated, I have to convert all my preg_replace to preg_replace_callback...
Old Code
$status = preg_replace("/((http:\/\/|https:\/\/)[^ )
]+)/e", "'<a href=\"$1\" title=\"$1\" >'. ((strlen('$1')>=250 ? substr('$1',0,250).'...':'$1')).'</a>'", $status);
And this is the one I have to change it to preg_replace_callback
$status = preg_replace_callback("/((http:\/\/|https:\/\/)[^ )d]+)/",
function($m) {
return '<a href=\"$m\" title=\"$m\" >'. ((strlen('$m[0]')>=250 ? substr('$m[0]',0,250).'...':'$m[0]')).'</a>';
},
$status);
But it is not working. I hope anyone will help me out