Parse the emptyis_null and isset tests in PHP. The code is as follows :? Php $ a; $ bfalse; $ c; $ d0; $ enull; $ farray (); first, the var_dump output of empty: booleantruebooleantruebooleantruebool:
The code is as follows:
$;
$ B = false;
$ C = '';
$ D = 0;
$ E = null;
$ F = array ();
The first is the var_dump output of empty:
Boolean true
Boolean true
Boolean true
Boolean true
Boolean true
Boolean true
Then the output of is_null is:
Boolean true
Boolean false
Boolean false
Boolean false
Boolean true
Boolean false
Finally, isset output:
Boolean false
Boolean true
Boolean true
Boolean true
Boolean false
Boolean true
It can be seen that empty () can be used to determine whether all data types are NULL or false, while is_null is basically the same as isset and can only be used to determine whether it is NULL or undefined.
The pipeline code is as follows :? Php $ a; $ B = false; $ c = ''; $ d = 0; $ e = null; $ f = array (); The first is the var_dump output of empty: boolean true bool...