php.js : is_double() function
is_double() function
The is_double() function is used to check whether a variable is a float or not. The function returns true if the variable is float otherwise false.
Version:
1103.1210
Syntax:
is_double(var_name)
Parameters:
Name | Description | Required / Optional |
Type |
---|---|---|---|
var_name | The variable being checked | Required | Mixed* |
*Mixed : Mixed indicates that a parameter may accept multiple (but not necessarily all) types.
Example of php.js is_double() function
In the following web document is_double() function test whether a variable is double or not.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>php.js : is_double() function example</title>
<script type="text/javascript" src="../../phpjs/variable/variable.min.js"> </script>
</head>
<body>
<h1 style="color: green">php.js : is_double() function example</h1>
<h3>Test whether a value is double or not.....</h3>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[
document.write('is_double(85)'+'<br>');
var_dump(is_double(85));
document.write('<br>'+'is_double(1185.44)'+'<br>');
var_dump(is_double(1185.44));
document.write('<br>'+'is_double(-11)'+'<br>');
var_dump(is_double(-11));
//]]>
</script>
</body>
</html>
Output of the function
is_double(85) bool(false) is_double(1185.44) bool(true) is_double(-11) bool(false)
View example of php.js is_double() function in browser
Previous: php.js : is_callable() function
Next:
php.js : is_float() function
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/phpjs/variable/is_double.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics