encode(39.98123848, 116.30683690); //取前缀,前缀约长范围越小 $prefix = substr($hash, 0, 8); $y = $geohash->decode($prefix); $z = $geohash->decode($hash); //取出相邻八个区域 $neighbors = $geohash->neighbors($prefix); array_push($neighbors, $prefix); print_r($neighbors); } }