Float Coercion
Cast passed value into a PHP float type.
Input Value | Output Result | Description |
|---|---|---|
|
| Returns float value "as is" |
|
| Converts int to a float value [1] |
|
| Converts string to a float value [2] |
|
| |
|
| |
|
| |
Other |
| Throws |
Notes
The int-to-float casts uses built-in PHP rules:
The mantissa
0will be added
The string value must satisfy the following rules:
Must be non-empty
Must contain numeric value
05 November 2025