<?php $time=6; switch (true){ case $time > 7: echo "time is true"; break; case $time < 7: echo "time is false"; break; } ?>