protected function getPrefixLength(array $strings)
	{
		$i      = 0;
		$len    = 0;
		$maxLen = min(array_map('strlen', $strings));
		while ($i < $maxLen)
		{
			$c = $strings[0][$i];
			foreach ($strings as $string)
			{
				if ($string[$i] !== $c)
				{
					break 2;
				}
			}
			$len = ++$i;
		}

		return $len;
	}
protected function getPrefixLength(array $strings)
	{
		$i      = 0;
		$len    = 0;
		$maxLen = min(array_map('strlen', $strings));
		while ($i < $maxLen)
		{
			$c = $strings[0][$i];
			foreach ($strings as $string)
			{
				if ($string[$i] !== $c)
				{
					break 2;
				}
			}
			$len = ++$i;
		}

		return $len;
	}
protected function getPrefixLength ( array $ strings ) { $ i = 0 ; $ len = 0 ; $ maxLen = min ( array_map ( 'strlen' , $ strings ) ) ; while ( $ i < $ maxLen ) { $ c = $ strings [ 0 ] [ $ i ] ; foreach ( $ strings as $ string ) { if ( $ string [ $ i ] !== $ c ) { break 2 ; } } $ len = ++ $ i ; } return $ len ; }
Compute the number of leading characters common to all strings

@param  string[] $strings
@return integer
Compute the number of leading characters common to all strings