3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = 'ver 1.0'; // string if(is_numeric($value)) { $value = (int)$value; if(strpos($value, '.')) { $value = (float)$value; } } var_dump($value);
based on Mb3hg
Output for 5.3.22 - 7.3.0rc4
string(7) "ver 1.0"