Home  >  Article  >  Backend Development  >  Things to note about arrays and strings in PHP

Things to note about arrays and strings in PHP

零下一度
零下一度Original
2017-06-23 13:18:381779browse

This time, I will take you to take a look at some precautions and functions (methods) about arrays and strings in PHP.

1. Arrays in PHP

(1) Introduction to arrays in PHP

The array type is one of the two composite data types in PHP. According to different subscripts, arrays in PHP can be divided into associative arrays and index arrays: The former means that the subscripts are in string format, and each subscript string and array The values ​​of have a one-to-one correspondence; the subscript of the latter is a number, which is the same as the array subscript in JS, but it is far different from JS in some rules (discussed later).

Regarding associative arrays and indexed arrays, as well as some differences between them and arrays in JS, the following Five items can be roughly summarized:

 1. In an array, index arrays and associative arrays can exist at the same time

 array(1,2,3,"four"=>4);

  2. In the array, all index arrays, if not specified, will remove the associated items and grow by default (that is, the associated array does not occupy the index position)

 array(1,2,3,"four "=>4,5,6); --> The indexes of 1,2,3,5,6 are 0 1 2 3 4

 3. If the key of the associated array, is a pure decimal integer string, this number will be converted into the index value of the index array

 array(1,2,3,"9"=>4); --> 1 The indexes of 2 3 4 are 0 1 2 9

 4. If you manually specify the key of the associated array, the subscript of the index array, if it is repeated with the previous key or subscript, then the following The specified value will overwrite the previous value

 array(1,2,"one"=>5,"one"=>6) --> Print array as 1 2 "one "=>6

 5. If you manually specify the index array subscript, the subsequent self-increasing subscripts will increase sequentially

according to the maximum value of the previous subscript. array(1,2,3,"9"=>4,5); --> The indexes of 1 2 3 4 5 are 0 1 2 9 10

Secondly, the index of the array in PHP Declaration method. There are three ways to declare arrays in PHP (such as the following code), namely direct assignment declaration, array declaration, and [] declaration. It should be noted that the third declaration method was added after PHP5.4 version. When using it, you must first check the PHP version used.

$arr[] = 4;  // 直接赋值声明$arr = [1,2,3,4]; //[]声明 $arr = array(1,2,3,4); //array声明

There are four main ways to traverse arrays in PHP, namely using for loop to traverse the array, foreach loop to traverse the array, and using list() each() while traverses the array and uses the array pointer to traverse the array. The detailed method K will be described in another blog post, so stay tuned.

Finally, there are several superglobal arrays involved in PHP arrays. The so-called superglobals are several system arrays that can be used directly anywhere and in any scope without declaration. They exist because of the variable scope restrictions in PHP scopes (PHP is really pitiful about this). The following code snippet is for your reference.

/* * 【超 全局 数组】
     * 超全局数组、超全局变量、预定义数组、预定义变量 --> 说的都是它
     * PHP给我们提供了一组包含强大功能的超全局数组。可以在任何地方、任何作用域不需声明,直接使用!!不受任何作用域限制。
     * 
        1  服务器变量: $_SERVER
     * 返回包含浏览器头信息,路径,脚本以及服务器系统等各种信息!
        2  环境变量:$_ENV
     * 将系统环境变量,转变为PHP中的数组。就是$_ENV;
     * PHP默认是关闭此全局数组的,如果需要使用,需修改php.ini温江中的variable_order="GPSC",改为EGPSC;
     * 但是,修改后会有系统性能损失,官方并不推荐使用。
     * 可以使用getenv()函数取代全局变量,取出每个系统环境变量的值。
     * phpinfo();函数,包含了有关PHP的各种信息,其中ENVIROMENT板块就是系统环境变量,可以使用getevn();取出其中的每一个值。
        !!!!3  HTTP GET变量:$_GET
     * 获取前台通过get方式提交的数据
        !!!!4  HHTP POST变量:$_POST
     * 获取前台通过post方式提交的数据
        5  request变量:$_REQUEST
     * 包括了$_GET/$_POST/$_COOKIE三者
     * 由于可能同时包含get post,可能导致键冲突,并且效率也不高,所以不常使用!!!
        6  HTTP文件上传变量:$_FILES
     * 通过HTTP POST方式上传到当前脚本的项目的数组
        7  HTTP Cookies:$_COOKIE
     * 取到页面中的cookie信息
        !!!!8  Session变量:$_SESSION
     * 取到保存在session中的信息
        9  Global变量:$GLOBALS
     * 包含上述8个全局数组
     * 还可以给$GLOBALS数组追加下标,创建全局变量     */

(2) Commonly used functions in PHP arrays

When talking about the functions of arrays in PHP, we first need to transfer them from JS Dear comrades, please remind me that the name "function" of an array in PHP is the same as the "method" of an array in JS. They both refer to the behavior of processing an array.. Because of the huge content of this part of the function, I first recommend you to read the help document (). Below are some notes recorded by K about array functions in PHP. You can paste them into the editor to cancel/set comments to experience them directly.

$arr = ["one"=>1,4,7,"9"=>10,"haha"=>"haha",4];    // 返回数组所有的值(数组)var_dump(array_values($arr));    // 返回数组所有的键(数组)var_dump(array_keys($arr));    // 检测数组中是否包含某个值(布尔)#参数# 需要查询的值,数组[,true(===)/false(==)]var_dump(in_array(1,$arr,true));    // 交换数组中的键和值(数组)var_dump(array_flip($arr));    // 翻转数组(数组)#参数# 数组[,true(保留原有索引数组的下标与值的匹配)/false(只翻转值,键不保留)] #无论ture/false,都不会影响关联数组,关联数组总会保留#var_dump(array_reverse($arr,TRUE));    // 统计数组元素个数(整形)var_dump(count($arr,0));    // 统计数组中每个值出现的次数(数组)var_dump(array_count_values($arr));#    !!不借助系统函数实现array_count_values的功能/* 思路
     * 1、有一个空数组:键 => 原数组的值 值 => 原数组每个值出现的次数 
     * 2、遍历原数组,取出原数组中的每一个值
     * 3、检测取出的值是否在新数组中有一个同名的键
     *         如果有:说明找到了与现在新取值相重复的值,那么就把新数组中这个键对应的值+1;
     *         如果无:说明截止现在,还没有与新取值重复的项,那么就在新数组中新建一个同名的键,并把值为1。     *//*    $arr1 = [0,2,5,7,9,4,2,1,5,7,1,0,1,1,1,1,1,2,4,4,5,7,7,4,3,2,4,6,8,5,3];
    $arr2 = array();
    foreach($arr1 as $key1=>$item1){
        $isHas = FALSE; // 标志变量!!!
        foreach($arr2 as $key2=>$item2){
            if($key2==$item1){
                $arr2[$item1]++;
                $isHas = TRUE;
            }
        }
        if(!$isHas) $arr2[$item1]=1;
    }
    var_dump($arr2);*/// 移除数组中重复的值
//    var_dump(array_unique($arr));

    //过滤数组中的每一个值/* * 不传回调函数:过滤掉所有空值(0、""、null、false、"0"、[])
     * 传回调函数:如下     *///    var_dump(array_filter($arr,function($num){
//        if($num>4){
//            return TRUE;
//        }else{
//            return FALSE;
//        }
//    }));
    
    //通过回调函数,对数组的每一个值,进行处理操作。
    //执行时,会给回调函数传递给两个参数,分别是value key,然后可以在回调函数中,对值和键进行处理!
    //但是,牵扯到修改值的时候,必须要传递地址!
//    var_dump(array_walk($funcname))

    ///*将数组的每个值交由回调函数进行映射处理
    array_map():第一个参数是一个回调函数,第二个参数起,是>=1个数组
    有几个数组,可以给回调函数传几个参数,表示每一个数组的一个value;
    可以对返回的value进行处理,处理完后通过return返回,那么新数组对应的值就是return回去的值*/$a =[1,2,3,4,5];$b =[1,2,3,4];var_dump(array_map(function($value1,$value2){return $value1+$value2;
        }, $a,$b));        /* * array_walk与array_map的异同
     * 两者都能遍历数组,通过回调函数,重新处理数组的每一个值
     * 不同点
     * 1、walk只能传一个数组,回调函数接受这个数组的值和键;map可以传多个数组,回调函数接受每个数组的值
     * 2、walk直接修改原数组;map不修改原数组,将新数组返回
     * 3、walk可以给回调函数传递一个其余参数;map只能传数组的值
     * 4、处理方式上,walk如果需要改掉原数组的值,需在回调函数中传递地址,直接修改变量的值;map是通过将新的值,用return返回,即可修改新数组的值。     *//* * 可以传入第二个参数,控制以何排序。第二个参数传1,表示按照数字排序;传2,表示按照ascii排序;默认自动检测
    sort -- 对数组排序(升序)
    rsort -- 对数组逆向排序(降序)
    usort --  使用用户自定义的比较函数对数组中的值进行排序
     * 下述三个函数常用于关联数组排序,用法同上
    asort -- 对数组进行排序并保持索引关系(关联数组排序)
    arsort --  对数组进行逆向排序并保持索引关系 
    uasort --  用户自定义的比较函数对数组进行排序并保持索引关联
     * 
    ksort -- 对数组按照键名排序
    krsort -- 对数组按照键名逆向排序
    uksort --  使用用户自定义的比较函数对数组中的键名进行排序
     * 自然排序,数字按照0-9,字母按照a-z进行排序
     * 下面两个函数,都会按照自然排序,并且排序时会保留键值关联
    natsort --  用“自然排序”算法对数组排序
    natcasesort --  用“自然排序”算法对数组不区分大小写字母排序 
     * 对多个数组或多维数组进行排序。
     * 第一个参数:第一个数组必选,之后都是可选参数
     * SORT_STRING/SORT_NUMBERIC按照字符串还是数字
     * SORT_DESC/SORT_ASC升降序排列
     * 
     * 排序规则,先排第一个数组,之后的数组,按照与第一个数组对应的关系,一列一列的移动
     * 
     * 如果对多个数组排序,需保持多个数组长度一致
    array_multisort -- 对多个数组或多维数组进行排序     */$arr = [1,2,3,4,9,7,6,10,22];    
//    sort($arr);

//    rsort($arr);

//    usort($arr,function($a,$b){#同JS中数组sort
//        return -$a+$b;
//    });

//    asort($arr);/*[不更改原数组]
     * array array_slice ( array $array , int $offset [, int $length = NULL [, bool $preserve_keys = false ]] )
     * 参数一: 数组,必选
     * 参数二:从第几位开始截选,必选,负数表示从右边第几位(按照数组的默认顺序,包含关联和索引,而非下标)
     * 参数三:截取长度,可选,默认全选
     * 参数四:表示是否保持键值关联,可选,默认索引重拍,为false,true为保持关联
     * *///    $arr1 = array_slice($arr,3,2);
//    var_dump($arr1);/*[更改原数组]
     * array array_splice ( array &$input , int $offset [, int $length = 0 [, mixed $replacement ]] )
     * 返回值:被删掉的数组
     * 参数一:数组的地址,会改变原数组
     * 参数二:从第几位开始删或替换
     * 参数三:删除或替换的长度
     * 参数四:为空表示删除操作,传入内容表示替换操作的新值
     * */$arr2 = array_splice($arr,4);        var_dump($arr2);    /* * array_combine — 创建一个数组,用一个数组的值作为其键名,另一个数组的值作为其值 
     * 参数一:作为键的数组
     * 参数二:作为值的数组
     * 【两个数组必须保持一致,否则警告,返回false】     */ /* 合并多个数组
     * array array_merge ( array $array1 [, array $... ] )
     * 合并多个数组,如果多个数组中,出现同名的关联键值,则后面的会覆盖前面的
     * */ /* 两个数组取交集
     * array array_intersect ( array $array1 , array $array2 [, array $ ... ] )
     * 多个数组取交集,结果会保留第一个数组的键值关联比配
     * */ /* 两个数组去差集
     * array array_diff ( array $array1 , array $array2 [, array $... ] )
     * 取出多个数组中,在第一个数组中包含,但在其他数组中不包含的值,保留第一个数组的键值关联
     * *//* * mixed array_pop ( array &$array )//删除数组最后一个值,且返回这个值
     * int array_push ( array &$array , mixed $var [, mixed $... ] )//数组的最后放入一到多个值,返回处理后数组的元素个数
     * 
     *     mixed array_shift ( array &$array )//删除数组第一个值,返回这个值
     * int array_unshift ( array &$array , mixed $var [, mixed $... ] )//数组开头放入一到多个值,返回处理之后的数组元素个数
     * */ /* * mixed array_rand ( array $input [, int $num_req = 1 ] )
     * 随机抽取数组中的一到多个键名,二参数为空,表示抽一个,传入数子表示抽几个
     * */ /* * bool shuffle ( array &$array )
     * 随机打乱数组顺序,直接修改原数组
     * */

二、PHP中的字符串

(一)PHP中的字符串简介

      PHP中的字符串是PHP四大基础数据类型之一。

      首先,来跟大家谈一下PHP中字符串的声明方式。PHP中字符串的声明方式有三种,分别是通过""、''、标识符来进行声明(详述可见)。

      其次,来跟大家以代码笔记的形式着重说一下PHP中的各种输出函数,笔记如下。

    /* * 【各种输出函数】
     * 1、echo(纯输出,无返回):直接将内容输出。可以是函数用法,也可以是指令用法;指令用法可以打印多个参数(逗号分割),函数用法只能打印一个参数。
     * 2、print(基本不用):有函数写法与指令写法,但两个都不能传多个参数;有返回值,返回值总是为true。
     * 3、print_r:打印数组和对象时,会用一定的格式显示键和值的匹配。print_r打印数组时,会将数组指针移向最后一位。
     * 4、var_dump:调试专用,显示打印的类型、值等信息,打印数组对象时,会缩进显示键值匹配,可以传入多个参数,同时打印。
     * 5、die:等同于exit,输出信息并且结束当前脚本,可以不输出信息。
     * 6、printf:打印内容并将变量进行格式化输出。第一个参数:需要打印的字符串内容,可以带多个占位符;第二到多个参数:与占位符一一对应的变量。将后面的变量按照占位符的格式要求依次输出。
     * 7、sprintf:使用同printf一样,只不过不是输出语句,而是将转换之后的结果赋给一个变量。
     * 
     * [常用占位符]
        %%    返回百分比符号
        %b    二进制数
        %c    依照ASCII值的字符
        %d    带符号十进制数
        %e        可续计数法(如1.5e3)
        %u    无符号十进制数
        %f或%F     浮点数  
     * -->  浮点数,默认保留六位小数
     * 百分号和f之间可以插入数字表示精确程度。
     * 数子的整数部分,表示精确的总宽度(整数+小数+小数点的总位数)。
     * 数字的小数部分表示保留几位小数,进行四舍五入保留。
     * 如果设置的宽度小于实际宽度,设置无效;如果设置的宽度大于实际宽度,左边空格补位。
     * 例如:$num = 10.12345;
     * printf("123%10.2f",$num);   -->           10.12
     * printf("123%010.2f",$num); -->  0000010.12
        %o    八进制数
        %s    字符串
        %x或%X  十六进制数     */

(二)PHP中的常用函数

      这里,K的建议同上述数组是一样的,同样推荐大家首先阅读帮助文档()。下面,K依然以代码笔记的方式来给同志们介绍一下PHP中的常用函数。

    /* * trim():删除字符串两端的空格;
     * ltrim():删除字符串左端的空格; 
     * rtrim():删除字符串右端的空格; 
     * 
     * 可以传入第二个参数,表示删除两边的相关字符。
     * 从字符串两边开始依次向内查找第二个参数中出现的字符,只要发现就删除,直到遇到第一个没有出现的字符为止。
     * 第二个字符常写为 " \t\n\r\0\x0B",用于把各种空格相关的符号全都删掉。
        " " (ASCII 32 (0x20)),普通空格符。  
        "\t" (ASCII 9 (0x09)),制表符。  
        "\n" (ASCII 10 (0x0A)),换行符。  
        "\r" (ASCII 13 (0x0D)),回车符。  
        "\0" (ASCII 0 (0x00)),空字节符。  
        "\x0B" (ASCII 11 (0x0B)),垂直制表符。
     * 
     * */$str = "  1  2  3  4  ";echo $str."\n";    echo ltrim($str)."\n";echo rtrim($str)."\n";echo trim($str)."\n";echo trim($str," 43")."\n";    /* * str_pad():将字符串填充到指定长度;
     * 参数一:需要填充的字符串,必选。
     * 参数二:需要将字符串填充到多长,必选。
     * --->如果长度小于等于字符串,则不会发生任何作用。
     * 参数三:需要填充的文本,可选。
     * --->默认用空格填充。
     * 参数四:在字符串的哪边填充,可选。
     * --->STR_PAD_BOTH:2
     * --->STR_PAD_LEFT:0
     * --->STR_PAD_RIGHT:1
     * --->默认填充在右边,如果选BOTH,则先从右边开始填。     */ $str1 = "abcd";    echo str_pad($str1, 11,"12",STR_PAD_BOTH);echo str_pad($str1, 11,"12",STR_PAD_LEFT);echo str_pad($str1, 11,"12",STR_PAD_RIGHT);    /* * strtolower():将所有字符转成小写
     * strtoupper():将所有字符转成大写
     * 上述两个常用于不区分大小写比对。
     * 
     * ucfirst():将字符串首字母转成大写
     * ucwords():将字符串每一个词首字母转成大写
     * 后两个只负责转首字母,并不管其他字母的大小写,如果只需要首字母大写,通常配合strtolower()先将字母转成小写。
     * */
    /* 与HTML相关的函数:
     * 1、nl2br():将字符串中的所有换行符,转为
     * 2、htmlspecialchars():将HTML中的符号,转换为实体内容。      *       & :&        ":"      *      ':'     <:< * >:>      空格:      * 转成特殊字符后,无需再转回,浏览器会自动解析为对应的标签符号。      * 3.将字符串中的所有HTML标签删除;      * 参数1:需要过滤HTML标签的字符串;      * 参数2:允许存在的HTML标签:strip_tags($str,"");只允许str这个字符串中,存在三个标签,其他的全部删除。      *       * *//*【常用字符串函数】  *1.strrev($str):将字符串翻转;"12345"-->"54321";   *2.strlen($str) :获取字符串字符个数,中文=三个字符  *mb_strlen($str):测量多字节字符串的长度,不论中英文均算一个长度;  * {PHP中,很多字符串函数,都有“mb_”的前缀,专门用于操作中文多字节字符串}  *3.number_format():将一个浮点数,要求格式化为一个字符串。  *             参数1:需要格式化的浮点数;必选。  *             参数2:保留几位小数(四舍五入),默认不保留;  *             参数3:小数点的显示符号,默认为“.”;  *             参数4:千位符的显示符号:默认为“,”;  *4.md5()/sha1():分别使用md5加密算法以及sha1加密算法对字符串进行加密操作;  * */$str="abcdefg哈哈哈";//一个汉字三个字符,一个字符一个字符翻转;echo strrev($str);echo "
";echo strlen($str);//字符串长度16echo "
";echo mb_strlen($str);//字符串长度10echo "
";echo number_format(12399.4567,4,"/","-");echo "
";echo md5($str);echo "
";echo sha1($str);echo "
";echo sha1($str)=="527e8bad76c863b8903c51f7eedad006678d5f96";/*【字符串的比较】  * 1.可以用比较运算符比较:  * < > ==:如果两边都是字符串,则比较首字母ASCII值,  *        如果一边是数字,则将字符串转为数字后再比对!  *(重要) 2.strcmp("$str1","$str2"):比较两个字符串,区分大小写;$str1>$str2-->1;$str1<$str2-->-1  $str1==$str2-->0  * 3.strncmp("$str1","$str2",int):比较方式与strcmp完全相同,只是多了一个必填的参数3,表示比较字符串的长度,strncmp("Asdsa", "adsa",2),只比较前两个字符串的前两个字符,如果比较汉字字符串,一个汉字占三个字符;  *(重要) 4.strcasecmp ("$str1","$str2")比较全串字符串,不区分大小写;  * 5.strnatcmp ("$str1","$str2"):将字符串按照自然排序算法进行排序比对;  *   strnatcmp ("10","2"):10>2,返回1;  *   strcmp("10", "2"):按照ASCII排序,1<2,返回-1;两者相等时都=0,没有任何差别。 *6. similar_text():返回两个字符串的相似度(两个字符串匹配字符的数目); * */ var_dump("a"<1);//"a"-->0;  var_dump(strcmp("A", "a"));//-1  var_dump(strcmp("5", "5"));//0  var_dump(strncmp("Aaer", "Aacc",2));//0  var_dump(strncmp("张与", "张三",2));//0  var_dump(strcasecmp ("abcd","ABCD"));//0  var_dump(strnatcmp ("i10","i2"));//1  var_dump(similar_text("123","234"));//相同字符的长度  /*【常用字符串操作函数】   * 1.explode():使用指定分隔符,将字符串分隔为数组;   *  参数1:使用什么分隔符;   *  参数2:需要分隔的字符串;   *  参数3:可选,将字符串最多分为几份,如果小于实际分数,则前n-1正常分,最后一个包含所有剩余字符串。   * 2.preg_split():通过一个正则表达式分隔字符串,参数同上,第一个参数为正则表达式   * 3.var_dump(str_split("hahah",2))--->["ha","ha","h"]   * */  var_dump(explode(",","s,t,y,u",3)); var_dump(preg_split("/[\s,]+/","asdh adcjk, asjdi"));   var_dump(str_split("hahah",2)); var_dump(mb_split("/[\w]{1}+/","sdsd,t,h"));//不好使  /*   * 3.implode() : 将一个一维数组的值转化为字符串   * 4.substr():截取的字符串;   *   第一个参数:需要截取的字符串;   *   第二个参数:从哪个字符开始截取;   *   第三个参数:需要截取的字符串长度(默认截取到最后)   * 5.mb_substr():用于截取中文字符串,一个汉字=1个字符;   *(重要)strstr():别名strchr():查找并返回字符串,是否包含某个子串,如果没有找到返回false   *   参数1:被查找的字符串,必选;   *   参数2:需要查找的子串,必选;   *   参数3:true/false:返回子串前面的部分;返回子串及子串的所有字符串,默认;   * 6.stristr():功能同上,不区分大小写,   * 7.strrchr():取到需查找字符在字符串中最后一次出现的位置;   * 第一个参数:被查找的字符串;   * 第二个参数:需要查找的字符,如果第二个参数是字符串,则会使用字符串的第一个字符,如果找到,返回该字符串最后一次出现的位置,往后的部分。   * */   var_dump(implode("-",["a","b","c"]));//--->"a-b-c";   var_dump(substr("12345", 2,3));  var_dump(mb_substr("1234哈哈", 2,4));  var_dump(strstr("1234", "23",true));  var_dump(stristr("123哈哈4", "哈",true)); var_dump(strrchr("ABC123ABC456","AdBC")); /* 【字符串查找】   * 1.strpos() : 返回某个字符串,查找字符串首次出现的位置;   *   参数1:被查找的字符串;   *   参数2:需要查找的子串;   *   参数3:从第几个位置开始查找;   * 2.strrpos():返回某个字符串,查找字符串最后出现的位置;   * 3.stripos():不区分大小写。返回第一次出现的位置;   * 4.strripos():不区分大小写。返回最后一次出现的位置;   * */  var_dump(strpos("123AxhBzABC","ABC",1));//8  var_dump(strripos("123AxhBzABC","abc"));//8  var_dump(strrpos("123AxhBzABC","ABC",1));//8  var_dump(stripos("123AxhBzABC","abc",1));//8  /*【字符串替换】   * str_replace():将字符串中指定的部分用指定内容替换;   *    参数1:被替换部分,可以是数组也可以是字符串;   *    参数2:新内容,可以是数组也可以是字符串;   *    参数3:原字符串;   * 共分为三类:1.第一个字符串,第二个字符串;   *          2.第一个数组,第二个数组:将两个数组一一进行映射替换;   * ①两个数组长度相等;将两个数组一一进行映射替换;   * ②第一个数组>第二个数组:第一个数组剩余部分用“”替换(即删了);   * ③第一个数组<第二个数组:第二个数组剩余的部分不用;   *          3.第一个数组,第二个字符串:数组的每一个都替换为字符串;   * */   var_dump(str_replace("e",",","jasbdheead"));  var_dump(str_replace(["e","a","d"],",","jasbdheead"));  var_dump(str_replace(["e","a","d"],[",","/",""],"jasbdheead"));  var_dump(str_replace(["e","a","d"],[",","/"],"jasbdheead"));  var_dump(str_replace(["e","a"],[",","/","-"],"jasbdheead"));  var_dump(str_replace(["e","a","d"],"/","jasbdheead"));

The above is the detailed content of Things to note about arrays and strings in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn