3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 10000.00; if (strpos((string)$number, '.') !== false) { list($number, $fraction) = explode('.', $number); if(empty($fraction)){ $fraction = "00"; } } echo $fraction; ?>

preferences:
39.06 ms | 402 KiB | 5 Q