$c = '33';
echo is_float($c);
This will not display the result
echo var_dump(is_float($c)) ;
This display is bool(false);
Don’t understand?
Shouldn’t the floating point confirm 33, and the original variable corresponding to 33 is consistent, should the returned value be 1 or true?
Seeking advice online~ Looking for another organization, looking for a big hug~
echo can only output string, integer and int floating point data. Composite and resource-type data cannot be printed;
You have used is_float, and the result is Boolean, so naturally the result cannot be produced.
var_dump can print arrays, objects and other composite variables and Any other type of data.
$c = '33';This is a string.
echo outputs variables and strings;
var_dump outputs variable type, variable length and variable value;
Does floating point float only correspond to data with decimal points?
Because I added a decimal point to the variable, the conversion judgment was correct~
Please answer~~~