note 102923 deleted from function.array-slice by danbrown

From: Date: Tue, 15 Mar 2011 13:53:14 +0000
Subject: note 102923 deleted from function.array-slice by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-177895@lists.php.net to get a copy of this message
Note Submitter: martingaleh at yahoo dot com ---- This function has an upper limit to how big the length parameter can be. For instance, this will return an empty array: $this=array('1','2','3','4'); print_r(array_splice($this,2,1000000000000000 000000000000000000000000000000000000000 000000000000000000000000000000000)); So, if you're a rookie like me, yes you have to detect the upper limit of the length and not just default it to a very large number

« previous php.notes (#177895) next »