either: if ( ($port >= MIN_UDP_PORT) && ($port <= MAX_UDP_PORT) ) { or: if ( $port >= MIN_UDP_PORT and $port <= MAX_UDP_PORT ) {