Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6779 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94174 invoked by uid 1010); 3 Jan 2004 21:44:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94151 invoked from network); 3 Jan 2004 21:44:03 -0000 Received: from unknown (HELO cicero2.cybercity.dk) (212.242.40.53) by pb1.pair.com with SMTP; 3 Jan 2004 21:44:03 -0000 Received: from uros.krug.dk (port118.ds1-rdo.adsl.cybercity.dk [212.242.124.121]) by cicero2.cybercity.dk (Postfix) with ESMTP id F342418F393; Sat, 3 Jan 2004 22:43:53 +0100 (CET) Received: from emini.dk (gw1.emini.dk [212.242.124.121]) by uros.krug.dk (Postfix) with ESMTP id 4298C15041E; Sat, 3 Jan 2004 22:43:19 +0100 (CET) Date: Sat, 3 Jan 2004 22:43:23 +0100 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: PHP Developers Mailing List To: Derick Rethans In-Reply-To: Message-ID: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.553) X-MailScanner-Information: Please contact postmaster@emini.dk for information X-MailScanner: Found to be clean Subject: Re: [PHP-DEV] $a{} stuff From: edink@emini.dk (Edin Kadribasic) References: On Saturday, Jan 3, 2004, at 22:35 Europe/Copenhagen, Derick Rethans wrote: > Hello, > > due to a little discussion on IRC I noticed that the following code > works: > > $a = "foobar"; > $a{strlen($a)-1}; > ?> > > now IMO the offset should only be a simple integer value, as this is a > little bit too much magic to me (and perlish). What is a "simple integer value"? You mean only to allow integer constants here? How are you supposed to process a string char by char without some sort of calculation of string offset? Edin