3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ '100,00', '100,12', '122,32', '120,00', '140,00', '123,85' ]; foreach($tests as $test){ echo $test," => ",preg_replace("/(\,0.*)/","",$test),PHP_EOL; }

preferences:
130.21 ms | 404 KiB | 5 Q