public static function toggleFlagGetState($file, $id) {

        static::checkFile($file, $toWrite = true);

        $content = file_get_contents($file);

        $id = preg_quote($id, '#');

        preg_match("#/\*$id\*/!!([0|1])#", $content, $match);

        if (isset($match['1'])) {
            return !!intval($match['1']); // return state of flag
        }

        return null; // no flag in file
    }