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; }
Output for 5.6.30 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0
0. 1 1. 1 2. 0