Command line parser written in PHP

Tiny, light and easy for using parser which give flags and arguments in same time.
class Cli_Parser
{
	/**
	 * @param string $argv - default is $_SERVER['argv']
	 * @return array(
	 * 		'flag' => array('flag1','flag2','flag3'), 
	 * 		'arg' => array('key2' => 'value2', 'key2' => 'value2', 'key3' => 'value3')
	 * )
	 */
	public static function get($argv = NULL) 
	{
		if ($argv === NULL)
		{
			$argv = $_SERVER['argv'];
		}
		
		$found_options = array('flag' => array(), 'arg' => array());
		
		// When arg is empty
		if (!is_array($argv) OR count($argv) < 2)
		{
			return $found_options;	
		}
		
		// First option is always filename 
		array_shift($argv);

		foreach ($argv AS $arg)
		{
			// It is flag
			if (substr($arg, 0, 1) == '-') // index.php -flag1 -flag2 -falg3 ...
			{
				$found_options['flag'][] = substr($arg, 1);
			}
			// It is arg
			else // index.php key="value" key2="value2" key3="value3" ...
			{
				$find_equally = strpos($arg, '=');
				
				if ($find_equally !== FALSE AND $find_equally > 0)
				{
					$found_options['arg'][substr($arg, 0, $find_equally)] = substr($arg, ($find_equally+1));
				}
			}
		}
		
		return $found_options;
	}
}