Home  >  Q&A  >  body text

What is the difference between gettype and var_dump?

<?php

$float=88.8;

$type=gettype($float);

echo $type.'<br /> ';

$var=var_dump($float);

echo $var.'<br /> Why are the types of the two executions different, one is double, and the other is Is it float';

?>

yjm7168yjm71682498 days ago1908

reply all(2)I'll reply

  • 无聊的人

    无聊的人2018-05-14 10:09:04

    Floating point type

    Single precision + double precision If you use is_float($float), it is also equal to true.

    reply
    0
  • 电动小老虎

    电动小老虎2017-11-21 00:36:43

    Double and faloat are the same. They both mean floating point type, but the precision of the data expressed is different.

    reply
    1
  • Cancelreply