$matches = [];
$result = preg_match('/\w+.\w+$/','info@gmail.com', $matches);
var_dump($result);
var_dump($matches);
$packageId = (int) $key["PackageId"];
if ($packageId === 1 || $packageId === 2) {
} else if ($packageId === 3 || $packageId === 4 ) {
}
$goodList = [1, 2, 3];
$badList = [4, 5, 6];
if (in_array($key["PackageId"], $goodList)) {
} else if (in_array($key["PackageId"], $badList)) {
}