PHP port of the s2-geometry-library-java