3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(verify(12.4444)); function verify($number) { if (!$number || !is_numeric($number)) { return true; } list(, $decimal) = explode('.', $number); if (strlen($decimal) != 4) { return false; } return true; }
Output for 4.3.0 - 7.2.0
bool(true)