Re: Bug #3003: split() limit not working correctly

From: Date: Sun, 19 Dec 1999 16:21:43 +0000
Subject: Re: Bug #3003: split() limit not working correctly
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-13849@lists.php.net to get a copy of this message
On Sun, 19 Dec 1999, norman@email.com wrote: > From: norman@email.com > Operating system: BSD/OS 3.1 i386 > PHP version: 3.0.12 > PHP Bug Type: Misbehaving function > Bug description: split() limit not working correctly > > split() seems to be truncating data when using a limit > argument, eg. > > <?php > $x = split("-", "a-b-c-d", 2); > print $x[1]; > ?> > > this should produce "b", but it produces "b-c-d" instead. > > this is the installation of PHP 3.0.12 used on www.iserver.com's accounts. > > i believe bug #1570 is the same problem. 'limit' parameter specifies how many _total_ pieces should be returned. So, in this case it returns "a" and "b-c-d". -Andrei * It's an emergent property of human minds to create. *

« previous php.dev (#13849) next »