mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-26 17:49:22 +00:00
Remove PHP v5.x support and add basic doc for how one may install the old version
This commit is contained in:
@@ -20,14 +20,6 @@ class Encoder
|
||||
public static function encodeJson()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
// Call json_encode() without the $depth parameter in PHP
|
||||
// versions less than 5.5.0 as the $depth parameter was added in
|
||||
// PHP version 5.5.0.
|
||||
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
||||
$args = array_slice($args, 0, 2);
|
||||
}
|
||||
|
||||
$value = call_user_func_array('json_encode', $args);
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
if (function_exists('json_last_error_msg')) {
|
||||
|
||||
Reference in New Issue
Block a user