PHP Output statements
(1) echo "helloworld! ";---echo command
(2) print (); The output statement is a function that has a return value. The output returned successfully to 1, and the failure returned 0.
(3) printf (); Format the output string. Example: printf ("%d,%f", 12,12.3);
(4) sprintf (); Format the stitching string, not the output statement, but only the string concatenation.
(5) Print_r (); Output arrays, objects, and other composite data types
1. Implicit conversions
$a = 1;
$b = 1.22;
$a = $b;
2. Casting
GetType ($ variable);
Settype ($ variable, "type")
Intval ($a)//$a data type unchanged, intval ($a) whole becomes shaping, zero conversion
Isset ()//variable exists
Unset ()//Destroy variable
Empty
function: Check if a variable is empty
* Return value:
* Returns TRUE if the variable does not exist
* If the variable exists and its value is "", 0, "0", NULL, FALSE, Array (), Var $var; and objects that do not have any properties, the TURE is returned.
* If the variable exists and the value is not "", 0, "0", NULL, FALSE, Array (), Var $var; And an object that does not have any properties, it returns FALSE
Judging variable types
Is_array (variable); Determine if the variable is an array, the following usage is the same
Array,double,float,real,long,int,integer,string,object,resourse,null,numeric
PHP Note 01