PHP Numbers
You must have noticed one thing that whenever we take the numbers in the identification, then its conversion becomes automatic Or we can say that whatever number we give through Varible, the data type of the number is automatically correct according to its data type.Then, if you assign a string to the same variable, the type will change to a string. PHP numbers with integersThis automatic conversion can sometimes break your code.
PHP Infinity
A numeric value that is larger than PHP_FLOAT_MAX is considered infinite.
PHP has the following functions to check if a numeric value is finite or infinite:
- is_finite()
- is_infinite()
However, the PHP var_dump() function returns the data type and value:
Example
Check if a numeric value is finite or infinite:
Example
NOTE :- Video on This Topic :- Soon
Have a Nice Stay Here : - )
<!DOCTYPE html>
<html>
<head>
<title> PHP numbers with infinty </title>
</head>
<body>
<h1> </h1>
<?php
// check if the type of a variable is integer
<html>
<head>
<title> PHP numbers with infinty </title>
</head>
<body>
<h1> </h1>
<?php
// check if the type of a variable is integer
$x = 1.9e41121;
var_dump($x);
?>
flaot(INF)
NOTE :- Video on This Topic :- Soon
Have a Nice Stay Here : - )
0 comments:
Post a Comment
For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.