Basic php functions

Source: Internet
Author: User
Basic php functions
              

Gettype: get the type of the variable. Intval: convert a variable to an integer. Doubleval: convert a variable to a double floating point. Empty: determines whether the variable is configured. Is_array: determines whether the variable type is an array type. Is_double: determines whether the variable type is a double floating point number type. Is_float: determines whether the variable type is of the floating point type. Is_int: determines whether the variable type is an integer. Is_integer: determines whether the variable type is a long integer. Is_long: determines whether the variable type is a long integer. Is_object: determines whether the variable type is of the class type. Is_real: determines whether the variable type is of the real number type. Is_string: determines whether the variable type is a string type. Isset: determines whether the variable is configured. Settype: configure the variable type. Strval: convert a variable to a string type. Unset: Delete a variable. Gettype gets the type of the variable. Syntax: string gettype (mixed var); return value: string function type: PHP system function description: This function is used to obtain the type of a variable. The returned type string may be one of the following strings: integer, double, string, array, object, and unknown type. See settype () intval variable to integer type. Syntax: int intval (mixed var, int [base]); return value: integer function type: PHP system function description: This function can convert a variable to an integer type. The base parameter that can be omitted is the basis for conversion. the default value is 10. The converted variable var can be any type variable outside the array or class. See doubleval () strval () settype () doubleval variable to multiply the floating point type. Syntax: double doubleval (mixed var); return value: double floating point function type: PHP system function description: This function can convert the variable type to double floating point. The converted variable var can be any type variable outside the array or class. See intval () strval () settype () empty to determine whether the variable is configured. Syntax: int empty (mixed var); return value: integer function type: PHP system function description: This function is used to test whether the variable has been configured. If the variable already exists, non-null string, or non-zero, false is returned; otherwise, true is returned. Note that aulbach @ unter. franken. de indicates (27-May-1999) if empty ($ myvar) is used )! =! Isset ($ myvar) may cause PHP processing problems. See isset () unset () is_array to determine whether the variable type is an array type. Syntax: int is_array (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the array type; otherwise, false is returned. See is_double () is_float () is_int () is_integer () is_long () is_object () is_real () is_string () is_double to determine whether the variable type is a double floating point number. Syntax: int is_double (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the double floating point type; otherwise, false is returned. For details, refer to is_array () is_float () is_int () is_integer () is_long () is_object () is_real () is_string () is_float. Syntax: int is_float (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the floating point type; otherwise, false is returned. See is_array () is_double () is_int () is_integer () is_long () is_object () is_real () is_string () is_int to determine whether the variable type is an integer. Syntax: int is_int (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the integer type; otherwise, false is returned. See is_array () is_double () is_float () is_integer () is_long () is_object () is_real () is_string () is_integer to determine whether the variable type is a long integer. Syntax: int is_integer (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of long integer type; otherwise, false is returned. This function is actually is_long (). See is_array () is_double () is_float () is_int () is_long () is_object () is_real () is_string () is_long to determine whether the variable type is a long integer. Syntax: int is_long (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of long integer type; otherwise, false is returned. For details, refer to is_array () is_double () is_float () is_int () is_integer () is_object () is_real () is_string () is_object. Syntax: int is_object (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the class type; otherwise, false is returned. Refer to: is_array () is_double () is_float () is_int () is_integer () is_long () is_real () is_string () is_real to determine whether the variable type is real. Syntax: int is_real (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the real number type; otherwise, false is returned. See is_array () is_double () is_float () is_int () is_integer () is_long () is_object () is_string to determine whether the variable type is string. Syntax: int is_string (mixed var); return value: integer function type: PHP system function description: true is returned if the variable is of the string type; otherwise, false is returned. See is_array () is_double () is_float () is_int () is_integer () is_long () is_object () is_real () isset to determine whether the variable is configured. Syntax: int isset (mixed var); return value: integer function type: PHP system function description: This function is used to test whether the variable has been configured. If the variable already exists, true is returned. Otherwise, false is returned. Example Refer to: empty () unset () settype to configure the variable type. Syntax: int settype (string var, string type); return value: integer function type: PHP system function description: This function is used to configure or convert the variable type. True is returned. otherwise, false is returned. The var parameter is the original variable name. the type parameter is of one of the following types: integer, double, string, array, and object. Reference: gettype () strval converts a variable to a string type. Syntax: string strval (mixed var); return value: string function type: PHP system function description: This function can convert the variable types outside the array and class to the string type. See doubleval () intval () settype () unset to delete a variable. Syntax: int unset (mixed var); return value: integer function type: PHP system function description: This function deletes the variable and returns true if it succeeds. Reference: isset () empty ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.