Jan,
The {} syntax is deprecated in PHP 6. I also believe it returns an E_STRICT
warning as of 5.1. Braces make sense when coming from languages like C
(where strings are simply character arrays) and the bracket notation always
seemed sort of kludgy to me anyway.
-Matt
----- Original Message -----
From: "Jan Pieper" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 22, 2006 1:56 PM
Subject: [fw-general] curly- instead of square-brackets?
Isn“t it better to use curly brackets ($foo{0}) instead of square brackets
($foo[0]) to get a single char of a string? I think it is a little bit
confusing to use square brackets for char selection of a string because
they are also used for arrays. (e.g. Zend_View_Abstract::__set())
-- Jan