note 124487 deleted from function.implode by cmb
| From: | cmb@php.net | Date: | Sat, 07 Dec 2019 12:34:36 +0000 |
| Subject: | note 124487 deleted from function.implode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213413@lists.php.net to get a copy of this message | ||
Note Submitter: radon8472
----
I discovered something important:
When you try to check for all versions lower than e.g. 7.4 and you try to do it like that:
<?php
if(version_compare(PHP_VERSION, '7.4.0', '>=')) {
// do 7.4 stuff
} else {
// do stuff for older version
}
?>
Versions followed by String suffix like "7.4.0beta1", "7.4.0alpha1" and
"7.4.0rc1" go to the "do 7.4 stuff" case.
So if you realy like to cover ALL versions e.g. over 7.4.0 you musst check like this:
<?php
if(version_compare(PHP_VERSION, '7.3.99', '>')) {
// do 7.4 stuff
} else {
// do stuff for older version
}
?>