Re: $a{} stuff
| From: | Edin Kadribasic | Date: | Sat, 03 Jan 2004 21:43:23 +0000 |
| Subject: | Re: $a{} stuff | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6779@lists.php.net to get a copy of this message | ||
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: <?php $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