amazon-pay-sdk-php icon indicating copy to clipboard operation
amazon-pay-sdk-php copied to clipboard

Update Client.php to replace depracated methods for newer PHP version

Open Be-Klasen opened this issue 9 years ago • 1 comments

using iconv_set_encoding is deprecated in PHP>50600. The proposed change checks the PHP version and uses the new method instead when appropriate.

Be-Klasen avatar Aug 26 '16 12:08 Be-Klasen

Why not version_compare() for this? http://php.net/manual/en/function.version-compare.php

Example:

if(version_compare(PHP_VERSION, '5.6.0') >= 0) {}

jobbrown avatar Sep 23 '16 11:09 jobbrown