$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~
殘留の回憶2019-08-21 09:33:07
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.
王林2019-08-20 11:17:58
$c = '33';This is a string.
echo outputs variables and strings;
var_dump outputs variable type, variable length and variable value;
本善之初2019-08-18 15:59:40
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~~~