a function of judging type
Is_bool()//to determine whether it is a Boolean typeis_float()//determines whether a floating-point typeIs_real()//Ibid .Is_int()//determine if the integer typeIs_integer()//Ibid .is_string()//determines whether a stringIs_object()//determines whether an objectIs_array()//determines whether an arrayIs_null()//Determine if NULLIs_file()//determine if the file isIs_dir()//determine if the directoryIs_numeric()//determine whether a numberIs_nan()//Judging is not a numberIs_resource()//determine if a resource typeis_a($obj,$classname)//determines whether an object is an instance of a class//available if ($obj instanceof Classname)
second, get the sub-string position
Strpos($HS,$nd[, int$offset= 0])//returns the number position of the first occurrence of ND in the HS. Stripos($HS,$nd[, int$offset= 0])//returns the number position of the first occurrence of ND in the HS, not case-sensitive. Strrpos($HS,$nd[, int$offset= 0])//returns the position of the last digit of ND in the HS. Strripos($HS,$nd[, int$offset= 0])//returns the number position of the last occurrence of ND in the HS, not case-sensitive.
third, get the sub-string
substr($str,$start[,$length]);//Get child stringstrstr($hys,$nd[, BOOL$before _needle=false]);//returns the string $nd the first occurrence of the $hys to the end of the string//third argument if True returns the string before $ndStristr($hys,$nd[, BOOL$before _needle=false]);//Ibid., Ignoring case versionsSTRRCHR($hys,$nd);//returns the string $nd the last occurrence of the $hys to the end of the string//General and substr (STRRCHR ($hys, $nd), strlen ($nd));
Iv. Replacement function
Str_replace($search,$replace,$subject[,&$count]);//Search and replace the string//fourth parameter is assigned, will be assigned to the number of times he replacedStr_ireplace($search,$replace,$subject[,&$count]);//Search and replace string//Fourth parameter is specified, will be assigned to the number of times he is replaced ignores caseSubstr_replace($string,$replacement,$start[,$length]);//string substring substitution//$replacement replace $string substring with length from startSTRTR($str,$from,$to)//returns a copy of Str and converts the character specified in the From to the corresponding character in to
Summary of common string functions in PHP