note 71852 deleted from function.array-slice by cmb

From: Date: Sun, 29 Dec 2019 12:29:57 +0000
Subject: note 71852 deleted from function.array-slice by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213704@lists.php.net to get a copy of this message
Note Submitter: ---- The version check on "ps at b1g dot de" function fails on my copy of PHP. My Version of PHP is "4.3.10-18", and it ends up checking 4310 <=> 502. Since we are looking for a version over 4.1.0, we cas use version_compare. <?php // PHP >= 5.0.2 is able to do this itself if(function_exists('version_compare') and version_compare(PHP_VERSION, '5.0.2') >= 0) { return array_slice($array, $offset, $length, true); } ?>

« previous php.notes (#213704) next »