Skip to content

Instantly share code, notes, and snippets.

@michaelcullum
Created October 13, 2013 22:08
Show Gist options
  • Select an option

  • Save michaelcullum/6967926 to your computer and use it in GitHub Desktop.

Select an option

Save michaelcullum/6967926 to your computer and use it in GitHub Desktop.
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0-dev', '3.1-a1', '<'));"
bool(false)
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0-dev', '3.1.0-a1', '<'));"
bool(true)
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0', '3.1.0-a1', '<'));"
bool(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment