, XenialDan * @link https://github.com/Ad5001/BetterGen * @category World Generator * @api 3.0.0 * @version 1.1 */ namespace Ad5001\BetterGen\utils; # Common utils under no namespace made for a specific usage class CommonUtils { /** * Searches case insensitively array $haystack for $needle. * src: http://php.net/manual/en/function.in-array.php#89256 * @param mixed $needle * @param array $haystack * @return bool */ static function in_arrayi($needle, array $haystack) :bool { return in_array(strtolower($needle), array_map('strtolower', $haystack)); } }