IS_FLOAT(3) 1 IS_FLOAT(3)is_float - Finds whether the type of a variable is floatSYNOPSIS
bool is_float (mixed $var)
DESCRIPTION
Finds whether the type of the given variable is float.
Note
To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use is_numeric(3).
PARAMETERS
o $var
- The variable being evaluated.
RETURN VALUES
Returns TRUE if $var is a float, FALSE otherwise.
EXAMPLES
Example #1
is_float(3) example
<?php
if (is_float(27.25)) {
echo "is float
";
} else {
echo "is not float
";
}
var_dump(is_float('abc'));
var_dump(is_float(23));
var_dump(is_float(23.5));
var_dump(is_float(1e7)); //Scientific Notation
var_dump(is_float(true));
?>
The above example will output:
is float
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
SEE ALSO is_bool(3), is_int(3), is_numeric(3), is_string(3), is_array(3), is_object(3).
PHP Documentation Group IS_FLOAT(3)
Hi,
I've got a problem with awk.
On a solaris box:
SunOS 5.8 Generic_108528-23 sun4u sparc SUNW,Sun-Fire-280R,
I am running the follow awk script:
# awk -f jawk ntest.dat
awk: too many output files 10
record number 11
#
Where jawk is:
#!/usr/bin/ksh
{ (4 Replies)
Hi,
I have this piece of shell script:
#!/bin/ksh
x=data1
x=data1
x=data1
for i in 1 2 3
do
cp x $IN_DIR
done
PerformNextTask
$IN_DIR is already designed to automatically pick up x and send x to other directory $OK_DIR. $IN_DIR will be empty once all x goes to $OK_DIR.... (2 Replies)
Does anyone know for sure how to tell whether the RHEL 3 / 4 / 5 server you're logged into is real or VMware, other than rpm -qa | grep -i vm?
And if the server is real, is there any way to tell from the OS level what kind of hardware you're on? I guess I'm looking for something analogous to... (2 Replies)
I am having hard time understanding what this really do to the environment? I do understand this part "tty -s && stty " but not "istrip"
# stty command is executed only if a tty is attached to the process.
# stty istrip : Strip input characters to 7 bits
tty -s && stty istrip
I am... (3 Replies)
I have a 12 core linux cpu but the load is really high on this box, hovering around 50. What configuration changes do we need to make so that system have no bottleneck. (13 Replies)