A PHP "point-in-polygon" utility. It’s heavily based on davidkonrad's excellent StackOverflow answer. All I did was condense it down to one class with a static method.
Just include the class in your code:
include_once 'path/to/class-mg-pip.php';
$point_in_question = new Point(LAT, LNG);
$polygon = array(
new Point(LAT, LNG),
new Point(LAT, LNG),
new Point(LAT, LNG),
new Point(LAT, LNG),
new Point(LAT, LNG),
new Point(LAT, LNG)
// etc...
);
Point::point_in_polygon( $point_in_question, $polygon ); // true || false