mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-26 19:29:16 +00:00
Remove PHP v5.x support and add basic doc for how one may install the old version
This commit is contained in:
@@ -16,14 +16,6 @@ class Decoder
|
||||
public static function decodeJson()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
// Call json_decode() without the $options parameter in PHP
|
||||
// versions less than 5.4.0 as the $options parameter was added in
|
||||
// PHP version 5.4.0.
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
|
||||
$args = array_slice($args, 0, 3);
|
||||
}
|
||||
|
||||
$response = call_user_func_array('json_decode', $args);
|
||||
if ($response === null) {
|
||||
$response = $args['0'];
|
||||
|
||||
Reference in New Issue
Block a user