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] . '-' . $subparcel; } else { echo $arr[0]; } ?>
based on oIeOq
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: subparcel in /in/X0EQ2 on line 9 32-
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: subparcel in /in/X0EQ2 on line 9 32-