Home > Backend Development > PHP Tutorial > PHP type-related system functions

PHP type-related system functions

WBOY
Release: 2016-07-29 08:56:47
Original
1134 people have browsed it

var_dump(): can output complete information of a variable.

getType(): Get the type name of a variable, the result is a word (string), setType(); Set the type of a variable, syntax: setType (variable name, target type)

isset() determines a variable Whether data exists:

empty() determines whether a data is empty: close to our daily concept (if not, it is empty)

unset(): destroys (delete) a variable.

is_XX type() series of functions: determine whether a certain data is of a certain type, including: is_int(), is_float(), is_numeric(), is_bool(), is_array(), is_scalar():

is_numeric() Yes: 3, 3.5, "3", "3.14" are all true

is_scalar(): Determine whether it is a scalar type (i.e. int, float, stirng, bool)

The above has introduced PHP's type-related system functions, including related content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template