3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datas = [ '123.456', '123', '123,456', ]; foreach($datas as $index => $data){ echo "$index. ".(int)preg_match('/^\d*(?:\.[0-9]+)?$/', $data).PHP_EOL; }