data type conversion

intval(), converts a variable to an integer variable.

floatval(), converts to floating point type.

strval(), converts to string type.

boolval(), converted to Boolean type.

<?php
	$str = '21212kk';
	echo intval($str);
?>

A function to determine the type:

is_array()

is_string()

is_bool()

is_float()

is_object()

is_int()

is_numeric()

is_resource()

is_null()

is_scalar()


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325840690&siteId=291194637