Re: Fixing new problems due to deprecations ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-09-28 18:49 GMT+02:00 Lester Caine <lester@xxxxxxxxxxx>:
>> - 'sort'=>preg_replace('/([0-9]+)/e', 'substr("000000000\\1", -10)', $value)
>> + 'sort'=>preg_replace_callback('/([0-9]+)/',  function ($match) { return substr("000000000$match", -10); }, $value)

Without looking at the documentation, and just reading the error and
some common sense, then $match would be an array and when used in
interpolation, it would be converted to a string. So it is likely you
would need to reference a specific index in the $match array for it to
work. like: "000000000{$match[???]}"

-- 
regards,

Kalle Sommer Nielsen
kalle@xxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux