3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $kod = '830.03.02'; $parts = explode('.', $kod); for($i=count($parts) - 1; $i >= 0; $i--) if ($parts[$i] != '00') break; $kod = implode('.', array_slice($parts, 0, $i + 1)); echo $kod;
based on YDSFa
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
830.03.02