doubleval

double doubleval(mixed value) 

Converts a value to a double.

Returns:

double

Description:

doubleval() attempts to convert a single scalar value to a double. A double is a floating-point number such as 1.3 or 0.129.

The function can convert any normal numeric value, as well as numbers that are represented in scientific notation (such as 1.879e4), as strings (" 1.98e7 is 1.98 times 10 to the power of 7" or "1,000 hairy monkeys"), in octal base notation (016 or 0377), or in hexadecimal base notation (0xFF or 0xDE004).

Note:

The maximum length of a floating-point number is platform-dependent. A common size for many platforms is the IEEE 64-bit floating-point format—approximately 1.8 x 10308 with a precision of about 14 digits.

Warning: ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.