note 71852 added to function.array-slice

From: Date: Tue, 19 Dec 2006 17:10:10 +0000
Subject: note 71852 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-120773@lists.php.net to get a copy of this message
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); } ?> ---- Server IP: 66.163.161.117 Probable Submitter: 75.51.7.63 ---- Manual Page -- http://www.php.net/manual/en/function.array-slice.php Edit -- https://master.php.net/note/edit/71852 Del: integrated -- https://master.php.net/note/delete/71852/integrated Del: useless -- https://master.php.net/note/delete/71852/useless Del: bad code -- https://master.php.net/note/delete/71852/bad+code Del: spam -- https://master.php.net/note/delete/71852/spam Del: non-english -- https://master.php.net/note/delete/71852/non-english Del: in docs -- https://master.php.net/note/delete/71852/in+docs Del: other reasons-- https://master.php.net/note/delete/71852 Reject -- https://master.php.net/note/reject/71852 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120773) next »