3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = '1e7'; var_dump($value); if(is_numeric($value)) { $value = (int)$value; if(strpos($value, '.')) { $value = (float)$value; } } var_dump($value);
based on c0unR
Output for 7.1.0 - 7.2.0
string(3) "1e7" int(10000000)
Output for 5.3.22 - 7.0.20
string(3) "1e7" int(1)