Compare decimal numbers in an alphanumeric value without preg_replace - PHP -


is possible compare decimal values value contains alphanumeric characters without using preg_replace or stripping out non-numeric values?

for instance comparing these 2 decimal values ( ignoring letters) simple operator >:
'down0.1.5.3'
'down0.1.7.1'

var_dump(version_compare('down0.1.5.3', 'down0.1.7.1')); var_dump(version_compare('down0.1.8.3', 'down0.1.7.1')); 

version_compare()


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -