Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38314 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78832 invoked from network); 17 Jun 2008 09:02:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2008 09:02:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.154 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 72.14.220.154 fg-out-1718.google.com Received: from [72.14.220.154] ([72.14.220.154:64425] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/D2-61252-A8D77584 for ; Tue, 17 Jun 2008 05:02:03 -0400 Received: by fg-out-1718.google.com with SMTP id 16so3845825fgg.23 for ; Tue, 17 Jun 2008 02:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type:references; bh=7iTXWqE3FUuORarihjoZjBYDvaYerULKbh+/ycKkjtk=; b=KESLe/m9nQer33S/bUGDGHK4Nt1DJB6xf2B1LYWrdBc1ADEivM09NUKnUP5deXbx0p HsS0Y3fnmTKmp2OlI03TZylLcJVQm70oIhtYzpH6rl6EQSKII490MXEjSTuRlVNBUdNs 3LfQRz3AphBVhwkD8h4F95PywVDzY5VC5SHWw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:references; b=rUHiaK2EZXa4sVFWoNZCrKw325exbnLPySFFYn18zAnBpcnr4Mta8t+7FYk7GMsLog 9dtO+8iKqJ16Tqz75oKOS6Jmn1Cm+ooHVj/USw9QleFIPExvcy/D02kGW2LRgoCyQ5OS 0SlZJNdJP/o3Z6omCX1vzPKJOJtQZVTB6UK9E= Received: by 10.86.68.20 with SMTP id q20mr8920737fga.2.1213693319903; Tue, 17 Jun 2008 02:01:59 -0700 (PDT) Received: by 10.86.97.3 with HTTP; Tue, 17 Jun 2008 02:01:59 -0700 (PDT) Message-ID: <10845a340806170201g47ea82pb9808ea1295d48c6@mail.gmail.com> Date: Tue, 17 Jun 2008 10:01:59 +0100 Reply-To: RQuadling@GoogleMail.com To: "Chris Stockton" Cc: "Arvids Godjuks" , "Andi Gutmans" , "Lars Strojny" , "Markus Fischer" , "PHP Developers Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11492_32590105.1213693319899" References: <77972256-ED0C-4FCE-8DEF-8283FE1BBFC5@roshambo.org> <484F0897.4040405@fischer.name> <1213139582.12765.5.camel@localhost> <698DE66518E7CA45812BD18E807866CE01AB3D1D@us-ex1.zend.net> <9b3df6a50806152320l71581b0dmefe2ccc63766d2e5@mail.gmail.com> Subject: Re: [PHP-DEV] deprecation status of $str{42} versus $str[42] From: rquadling@googlemail.com ("Richard Quadling") ------=_Part_11492_32590105.1213693319899 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/6/16 Chris Stockton : > Hello, > > On Sun, Jun 15, 2008 at 11:20 PM, Arvids Godjuks > > wrote: > > > String is an array of chars, always was and is such in any programming > > language. So I see argument for {} as missing knowledge for some > programming > > basics. > > > > And I don't understand why are you arguing on this. This was decided for > > removal long ago - so just do it. > > > > Seems like you are missing some PHP programming basics. Strings are not an > array of chars, please go back to making ping pong in java c# or whatever > other little comp sci classes you took. PHP is not any of them. > Foreach("foo" as $key => $char) {}, after learning, please be quiet and let > andi answer my question on his ideas he had for improvements to the > existing > and once favored syntax. > > -Chris > Sort of in response to "whatever other little comp sci classes you took" and sort of explaining what a user sees. I'm a self taught software developer and have been in paid employment for over 20 years and only in 2 jobs. So, even if I don't know everything about PHP's internals, my skills are good enough not to get me fired. In that time, I've used (to a different amount) COBOL, Sage Retrieve 4GL, C, Delphi, JS, PHP, MS DOS Batch files. In nearly all of these languages a "string" is a series of characters which can be accessed via an offset from the beginning of the "string". In many cases the syntax is the same as that of accessing an array element. In the languages where it is necessary to define the length of the string, defining an array and a string are done in similar ways. Not identically by any means, but the "user" impression is that they are similar. The example Chris gave was for iterating an array. Strings cannot be iterated in the same manner, but that doesn't mean you cannot traverse a string and an array in the same way.