I would do it this way, first I'll need to compute the distance between two points (this is a method close to the one of Google Maps: https://stackoverflow.com/a/53069194/7071905) :
function computeDistance($lat1, $lng1, $lat2, $lng2, $radius)
{
static $x = M_PI / 180;
$lat1 *= $x; $lng1 *= $x;
$lat2 *= $x; $lng2 *= $x;
$distance = 2 * asin(sqrt(pow(sin(($lat1 - $lat2) / 2), 2) + cos($lat1) * cos($lat2) * pow(sin(($lng1 - $lng2) / 2), 2)));
return $distance * $radius;
}
Then I'll need a simple function with the base point (the center) to return true when the distance is below 10 kilometers ($KM) :
function isWithinCircle($lat, $lng, $KM = 10): bool
{
$baseLat = 0;
$baseLng = 0;
$radius = 6378137;
return computeDistance($baseLat, $baseLng, $lat, $lng, $radius) <= $KM;
}