<?php
$a = '1.23456789012345678';
$b = 111111111111111111.9;
var_dump('Length : ' . strlen($a), (float) $a, $a == (float) $a, $b, 'Missing 8 ' . json_encode(array($a), JSON_NUMERIC_CHECK));
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- string(11) "Length : 19"
float(1.2345678901234567)
bool(true)
float(1.111111111111111E+17)
string(30) "Missing 8 [1.2345678901234567]"
- Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
- string(11) "Length : 19"
float(1.2345678901235)
bool(true)
float(1.1111111111111E+17)
string(30) "Missing 8 [1.2345678901234567]"
preferences:
91.35 ms | 411 KiB | 6 Q