note 124487 added to function.implode

From: Date: Sat, 07 Dec 2019 12:04:47 +0000
Subject: note 124487 added to function.implode
Groups: php.notes 
Request: Send a blank email to php-notes+get-213411@lists.php.net to get a copy of this message
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 } ?> ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.195 (proxied: 92.193.201.228) ---- Manual Page -- http://php.net/manual/en/function.implode.php Edit -- https://master.php.net/note/edit/124487 Del: integrated -- https://master.php.net/note/delete/124487/integrated Del: useless -- https://master.php.net/note/delete/124487/useless Del: bad code -- https://master.php.net/note/delete/124487/bad+code Del: spam -- https://master.php.net/note/delete/124487/spam Del: non-english -- https://master.php.net/note/delete/124487/non-english Del: in docs -- https://master.php.net/note/delete/124487/in+docs Del: other reasons-- https://master.php.net/note/delete/124487 Reject -- https://master.php.net/note/reject/124487 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#213411) next »