亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP data type floating point type

The so-called floating point type can be understood as: the decimal in our mathematics.

[Note] Precision, value range and scientific statements are not the focus of learning. Because this block is rarely used in actual development. We label the learning of knowledge points in this block as the understanding level.

There are two declaration methods:

Common declaration

Scientific declaration

Common declaration of floating point number

<?php
//聲明變量fudian的值為12121.3132
$fudian = 12121.3132;
echo $fudian;
?>
<?php
//聲明變量$fl 的值為0.8873
$fl = 0.8873;
var_dump($fl);
?>

We will save the file Go to the htdocs directory of XAMPP and save the file name: float.php. In the browser address bar, enter: http://127.0.0.1/float.php, execute it and see the results, as follows:

2015-07-26_55b4867a47de5.png

echo directly outputs 12121.3132, and var_dump The output is 0.8873, and it also shows that the type of variable $fl is float.


var_dump() is a function. Insert variables between brackets (). This function will print out the data type and also display the length and value of the variable accordingly.

var refers to the English word for variable: variable
float Pronunciation: [flo?t]
Chinese explanation: Floating point type in computers

variable Pronunciation: [?veri?bl]
Chinese explanation: variable

dump Pronunciation: [d?mp]
Chinese explanation: dump; dump;


Continuing Learning
||
<?php //聲明變量fudian的值為12121.3132 $fudian = 12121.3132; echo $fudian; //聲明變量$fl 的值為0.8873 $fl = 0.8873; var_dump($fl); ?>
submitReset Code