3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $maxOccu = 1; $adultCount = 1; $maxChildrenFree = 1; $childCount = 2; $remainingOccupancySlots = $maxOccu - $adultCount; $remainingChildrenToOccupySlots = $maxChildrenFree - $childCount; echo 'Occupancy remaining: ' . $remainingOccupancySlots; echo 'children to occupy slots: ' . $remainingChildrenToOccupySlots; if (($remainingOccupancySlots >= 0 && $remainingChildrenToOccupySlots <= 0) || ($remainingOccupancySlots >= $remainingChildrenToOccupySlots) ) { echo 'true'; }
based on YvrEW
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
Occupancy remaining: 0children to occupy slots: -1true