$k = 4; //this will initialize the variable and set it up to be an integer $l = (float) $k; // this converts the variable to a float var_dump($l);The Output is "float(4)", since the variable was converted from integer to float
Be aware that even tough integer variables can hold significant data of up to 2147483647 on a 32-Bit system, therefor they can run into overload.
Symfony Expert a leading Symfony development company in USA. Hire Symfony developer at affordable price.
AntwortenLöschen