Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32542 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95140 invoked by uid 1010); 2 Oct 2007 12:36:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95125 invoked from network); 2 Oct 2007 12:36:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Oct 2007 12:36:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.237 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 64.233.184.237 wr-out-0506.google.com Linux 2.4/2.6 Received: from [64.233.184.237] ([64.233.184.237:26586] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/E0-04813-F2B32074 for ; Tue, 02 Oct 2007 08:36:00 -0400 Received: by wr-out-0506.google.com with SMTP id 58so2396169wri for ; Tue, 02 Oct 2007 05:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vcw1dapltQmF37mSHaE2AFfPR9qm7EfpFmdPoeDBbp4=; b=hRdpPsglgdtL24lmMGs8gPJVEmI15ADnfkigDt3xh3e+Z+TY23q20xFXnTaaPGBiN7kSMjACM1K38zDVhxFH3n5v2zWASbNXuUzejYPvvepZHIMu8ZDLrucCFzdASvl8qiR4qiCsT1N6x7Zv+1zdx7iaKxBguhl3bjw0tB9xrk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PQ11pB1YXmxK4p8z153PDd9VrSBgeMoyrPmv9CVbXcTLASvza7ea617nmta05dl4RdEf/zUWFjyMcldy6BdLWT/jM7eddGj4B3sfPqSph/1dJqby7ZM+Irh5m7i83PYC6EAM9Ig4YZ14C3BlA90Rq0ce6tI5c39rJPKTq3SfuVk= Received: by 10.90.52.18 with SMTP id z18mr7756238agz.1191328543907; Tue, 02 Oct 2007 05:35:43 -0700 (PDT) Received: by 10.90.84.5 with HTTP; Tue, 2 Oct 2007 05:35:43 -0700 (PDT) Message-ID: Date: Tue, 2 Oct 2007 16:35:43 +0400 To: "Martin Alterisio" Cc: "PHP Developers Mailing List" In-Reply-To: <52dbac0f0710011236u626c9566l6ab474dce0b3132e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <52dbac0f0710011236u626c9566l6ab474dce0b3132e@mail.gmail.com> Subject: Re: [PHP-DEV] substr/array_slice in [] From: indeyets@gmail.com ("Alexey Zakhlestin") On 10/1/07, Martin Alterisio wrote: > Sorry to bother, I have a few questions on this matter. > How will this impact on the SPL ArrayAccess and related interfaces and > objects? > Will there be an interface to this functionality? > If so, how will ranges be passed through to this interface? > Will this be consistent with substr() and array_slice() if used with an > ArrayAccess implementation? I guess it can be made to work with current ArrayAccess, but result will be quite slow. (it will need to query requested elements one-by-one and recombine those in array) But adding another interface can solve the problem. Ranges can be passed exactly the way they are passed to [] operator public function rangeGet($start, $length); public function rangeSet($start, $length, array $data); -- Alexey Zakhlestin http://blog.milkfarmsoft.com/