3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $parcel = "32.1"; $supparcel = ""; $arr = explode('.',$parcel); if (count($arr) > 1){ $supparcel = $arr[1]; } if ($supparcel != ""){ echo $arr[0] . '-' . $supparcel; } else { echo $arr[0]; } ?>
based on X0EQ2
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
32-1