kvz/phpjs — pull request #82 by mcuadros (2013-04-23 23:47:20+00:00)
Title: [Fix] version compare with patch version

Hi,

I am working porting version_compare from PHP to GO, and i was checking the code from PHPJS and i based my code on it, but i found a little bug running the full unit test from php-src.

https://github.com/php/php-src/blob/master/ext/standard/tests/versioning/version_compare.phpt

```
CompareVersion( 1.0 >= 1.0pl1) = true: want false
CompareVersion( 1.0pl1 le 1.0 ) = true: want false
CompareVersion( 1.0 <= 1.0pl1) = false: want true
CompareVersion( 1.0 < 1.0pl1) = false: want true
CompareVersion( 1.0pl1 gt 1.0 ) = false: want true
CompareVersion( 1.0 ge 1.0pl1) = true: want false
CompareVersion( 1.0 lt 1.0pl1) = false: want true
CompareVersion( 1.0pl1 lt 1.0 ) = true: want false
CompareVersion( 1.0 gt 1.0pl1) = true: want false
CompareVersion( 1.0pl1 ge 1.0 ) = false: want true
CompareVersion( 1.0 > 1.0pl1) = true: want false
CompareVersion( 1.0 le 1.0pl1) = false: want true
CompareVersion( 1.0pl1 <= 1.0 ) = true: want false
CompareVersion( 1.0pl1 >= 1.0 ) = false: want true
CompareVersion( 1.0pl1 > 1.0 ) = false: want true
CompareVersion( 1.0pl1 < 1.0 ) = true: want false
```

Just this.

Thanks and thanks!