src/PoEntry.php
public function hasFlag(string $name): bool
    {
        $flags = array();
        $flagEntry = $this->entry[PoTokens::FLAG];
        if (!empty($flagEntry)) {
            foreach ((array) $flagEntry as $csv) {
                $temp = str_getcsv($csv, ',');
                foreach ($temp as $flag) {
                    $flag = strtolower(trim($flag));
                    $flags[$flag] = $flag;
                }
            }
            return isset($flags[strtolower(trim($name))]);
        }
        return false;
    }
public function hasFlag(string $name): bool
    {
        $flags = array();
        $flagEntry = $this->entry[PoTokens::FLAG];
        if (!empty($flagEntry)) {
            foreach ((array) $flagEntry as $csv) {
                $temp = str_getcsv($csv, ',');
                foreach ($temp as $flag) {
                    $flag = strtolower(trim($flag));
                    $flags[$flag] = $flag;
                }
            }
            return isset($flags[strtolower(trim($name))]);
        }
        return false;
    }
public function hasFlag ( string $ name ) : bool { $ flags = array ( ) ; $ flagEntry = $ this -> entry [ PoTokens :: FLAG ] ; if ( ! empty ( $ flagEntry ) ) { foreach ( ( array ) $ flagEntry as $ csv ) { $ temp = str_getcsv ( $ csv , ',' ) ; foreach ( $ temp as $ flag ) { $ flag = strtolower ( trim ( $ flag ) ) ; $ flags [ $ flag ] = $ flag ; } } return isset ( $ flags [ strtolower ( trim ( $ name ) ) ] ) ; } return false ; }
check for presence of a flag

@param string $name flag to check

@return boolean true if flag is set, otherwise false
check for presence of a flag