Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199908

[PHP3] phpversion() question From: Aaron Leon Kaplan (jjl <email protected>)
Date: 08/03/99

Hi!

I would like to check if someone has a php version < 3.0.10 running.
I understand that phpversion() returns a string. Ok, strings can be
compared in lexical ordering with the "<", ">", etc. operators.

Now comes the big question: will phpversion return the string
"3.0.09" or "3.0.9" if someone is running that version?

In the first case, lexical ordering will work, in the second case it wont.

Summary of question:
whats the best way to compare php version numbers?
I would like to avoid parsing the phpversion() string by hand...

Aaron.

---

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>