Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51753 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16026 invoked from network); 30 Mar 2011 15:56:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2011 15:56:24 -0000 Authentication-Results: pb1.pair.com header.from=chadfulton@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=chadfulton@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chadfulton@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:43655] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/06-07269-7A2539D4 for ; Wed, 30 Mar 2011 10:56:24 -0500 Received: by iyb12 with SMTP id 12so1565280iyb.29 for ; Wed, 30 Mar 2011 08:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=JSl5YzcGIxx22/UwKuvD8jsNXGx1rs/L3BFLi4iPGJ0=; b=VV59XaoH6P3VNQ0f5IBUEbdEPSPFkewcLkAZttT+lT/hM9/m20Vri19IloruEjIvhQ sHYeCzwRNs+Ty6km/rD4wvNzQ8AqG+GF5pkVjlUt0HyA61qhnQUbwt5dcuJ9Znrucjoi pI42QUElkwPlXaUf6XG7MC6h+Qq2PaqkrqWgc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=LGM1wLGH5dWZdapdbMVBmIynxKc9pdDAsb/xDqABrOaQn9JgFJFTcsjkohnBb1VKv/ gUIVvhq3dp2iwnWXtA2rl6MnlLAaSD1KNZpgqxGiwkyqlyJd7BT+1vnkKE9rRUOoTMdE zEjmURG9d9yUMCdm/ChgKQtOnG5pDpwRR9IWo= Received: by 10.231.193.202 with SMTP id dv10mr1439349ibb.136.1301500501196; Wed, 30 Mar 2011 08:55:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.12.5 with HTTP; Wed, 30 Mar 2011 08:54:41 -0700 (PDT) In-Reply-To: <004301cbeee8$e54a8280$afdf8780$@com> References: <4D92CC38.5040900@toolpark.com> <004301cbeee8$e54a8280$afdf8780$@com> Date: Wed, 30 Mar 2011 08:54:41 -0700 Message-ID: To: Jonathan Bond-Caron Cc: Hannes Landeholm , Dan Birken , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Adding a more logical string slicing function to PHP From: chadfulton@gmail.com (Chad Fulton) Hello! While I personally like PHP's substr() an awful lot and doubt I would use the str_slice() method, I thought I'd mention that I think what you're proposing is much like the string.substring(from, to) method in Javascript (and PHP's current substr() function is an awful lot like Javascript's string.substr(start, end) method). With that in mind, if this function was to be implemented, I think that naming it substring() instead of str_slice() might make it easier for people to pick up out of the box, since PHP developers often have quite a bit of overlap with Javascript. Chad