public static function parse ($version)
    {
        $nums = explode(self::DELIMITER, $version);
        $numbers = array();
        foreach ($nums as $num) {
            if (preg_match('/^0*([0-9]+)/', $num, $matches)) {
                if (isset($matches[1])) {
                    $numbers[] = $matches[1];
                } else {
                    $numbers[] = 0;
                }
            } else {
                break;
            }
        }
        if (! sizeof($numbers)) {
            $numbers = array(0);
        }
        return $numbers;
    }
public static function parse ($version)
    {
        $nums = explode(self::DELIMITER, $version);
        $numbers = array();
        foreach ($nums as $num) {
            if (preg_match('/^0*([0-9]+)/', $num, $matches)) {
                if (isset($matches[1])) {
                    $numbers[] = $matches[1];
                } else {
                    $numbers[] = 0;
                }
            } else {
                break;
            }
        }
        if (! sizeof($numbers)) {
            $numbers = array(0);
        }
        return $numbers;
    }
public static function parse ( $ version ) { $ nums = explode ( self :: DELIMITER , $ version ) ; $ numbers = array ( ) ; foreach ( $ nums as $ num ) { if ( preg_match ( '/^0*([0-9]+)/' , $ num , $ matches ) ) { if ( isset ( $ matches [ 1 ] ) ) { $ numbers [ ] = $ matches [ 1 ] ; } else { $ numbers [ ] = 0 ; } } else { break ; } } if ( ! sizeof ( $ numbers ) ) { $ numbers = array ( 0 ) ; } return $ numbers ; }
Parse array of integers based on version
number

Non-integer values and preceeding zeros are
dropped.

@param $version string
@return array
Parse array of integers based on version number