56.com视频采集接口程序(PHP)

2019-04-11 00:54:56王振洲

                if(is_numeric($str)) {
                    return ((float)$str == (integer)$str)
                        ? (integer)$str
                        : (float)$str;

                } elseif(preg_match('/^".+"$/s', $str) || preg_match('/^'.+'$/s', $str)) {
                    $delim = substr($str, 0, 1);
                    $chrs = substr($str, 1, -1);
                    $utf8 = '';
                    $strlen_chrs = strlen($chrs);

                    for($c = 0; $c < $strlen_chrs; $c++) {

                        $substr_chrs_c_2 = substr($chrs, $c, 2);
                        $ord_chrs_c = ord($chrs{$c});

                        if($substr_chrs_c_2 == 'b') {
                            $utf8 .= chr(0x08); $c+=1;

                        } elseif($substr_chrs_c_2 == 't') {
                            $utf8 .= chr(0x09); $c+=1;

                        } elseif($substr_chrs_c_2 == 'n') {
相关文章 大家在看