vendor/abraham/twitteroauth/src/Util/JsonDecoder.php

(完整代码) 652B

<?php

namespace Abraham\TwitterOAuth\Util;

/**
 * @author louis <louis@systemli.org>
 */
class JsonDecoder
{
    /**
     * Decodes a JSON string to stdObject or associative array
     *
     * @param string $string
     * @param bool   $asArray
     *
     * @return array|object
     */
    public static function decode(string $string, bool $asArray)
    {
        if (
            version_compare(PHP_VERSION, '5.4.0', '>=') &&
            !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)
        ) {
            return json_decode($string, $asArray, 512, JSON_BIGINT_AS_STRING);
        }

        return json_decode($string, $asArray);
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。