Re: language doc additions

From: Date: Wed, 16 May 2001 13:52:10 +0000
Subject: Re: language doc additions
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969335316@lists.php.net to get a copy of this message
Hi, > I noted something, while PHPscripting today. > > echo "${x}"; > echo "{$x}"; > works the same, even with array. > I didn't try with objects, but should be the same. > May be you want to add this, or curse it from the docs. > What you think? The latter one is the 'complex syntax', since PHP4. The former one exists since PHP3, and is not necessary anymore. I could remove it, but then PHP3-people will have a problem: they cannot use the latter syntax. However, for clarity it's maybe best to remove the former from it's prominent place, and make the story like: - use the simple syntax: "this is the value: $var; the second array-index ($arr[2]) and a property $obj->prop from this" when possible (i.e. no conflicting characters after the var, no complexer things (like multi-dim arrays, variable vars, indices, etc). - In ANY other case, use the complex syntax. And then a note: in php3, you can't use the complex syntax, use the very special ". and ." seperators in place of the { and } instead ;-) Greets, Jeroen

« previous php.doc (#969335316) next »