0
$cityval        = preg_replace('/(\s)+/', ' ', $cityval);               
$serial_extra  = preg_replace('/(\s)+/', ' ', $serial_extra);               
$serial_extra  = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $serial_extra);                

I was using PHP 5.6 version, once I upgrade it to 7.1 version it shows an error "code deprecated". Please suggest me any better replacement of this code

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
WeDevelop
  • 79
  • 2
  • 13
  • Its deprecated, that mean you have until you move to 7.2 at least to find your own solution – RiggsFolly Mar 24 '20 at 12:39
  • A useful read, before moving versions of PHP is the Deprecation notices https://www.php.net/manual/en/migration71.deprecated.php – RiggsFolly Mar 24 '20 at 12:43
  • And before you move again https://www.php.net/manual/en/migration72.deprecated.php and https://www.php.net/manual/en/migration73.deprecated.php and https://www.php.net/manual/en/migration74.deprecated.php – RiggsFolly Mar 24 '20 at 12:43

0 Answers0