Doc #9983 [Ver->Csd]: Operator Precedence Clarification/Additions
| From: | frozenfire@php.net | Date: | Sun, 04 Dec 2011 04:05:12 +0000 |
| Subject: | Doc #9983 [Ver->Csd]: Operator Precedence Clarification/Additions | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7549@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=9983&edit=1
ID: 9983
Updated by: frozenfire@php.net
Reported by: yohgaki at dd dot iij4u dot or dot jp
Summary: Operator Precedence Clarification/Additions
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Any
PHP Version: Any
-Assigned To:
+Assigned To: frozenfire
Block user comment: N
Private report: N
New Comment:
This behaviour seems no longer to apply. In the example code, $str will now
contain "TESTtrueTEST".
Previous Comments:
------------------------------------------------------------------------
[2002-07-02 09:12:50] eru@php.net
Redefined Version and OS for the Bughunt. Still open, still needs clarification from some
experienced doc-writer.
------------------------------------------------------------------------
[2002-02-27 09:22:48] sander@php.net
=== from #15368 ===
The operators seciot of the online PHP Manual omits mention of:
{} -- used to extarct a particular character from a string (with an aside about using {} to embed
variable values in strings);
[] -- the array subscriptor (which is actually listed inthe operator precedence table, though
mentioned nowhere else);
-> -- the object property/method accessor;
& -- the reference operator (also listed in the precendence table, though never explained
elsewhere);
=> -- the array key-to-value keyword (not techniclly an operator, I know, but because
it's so "punctuation-y", probably a good thing to comment on in this section).
Also, the operators precendence table at
http://www.php.net/manual/en/language.operators.precedence.php
should probably hyperlink each operator to the appropriate page describing it.
And finally, it might make more sense to put the operator precendence information (including the new
and improved table with hyperlinks) right on the first page of the operators section (rather than
the arithmentic
operators information).
------------------------------------------------------------------------
[2002-02-07 09:37:02] hek at loudoun dot net
This is substantially the same as Bug#15368.
------------------------------------------------------------------------
[2001-06-27 03:37:24] yohgaki at dd dot iij4u dot or dot jp
This is a suggestion for improving the manual.
(I don't mind at all if you close this :)
Reference is for PHP programmers, so I think precidence section is better to include more operators.
For example, it does not matter if unary '+/-', array '[]', member selecter
'->', etc are treated by parser or internal function for programmers. Programmers
don't cares about it when they are programming in some language, right?
Important thing for programmers is the precedence itself in some expression.
How about add more description for precedence just like other books or references for programming
languages?
I feel precedence is not described fully in current manual and it's worth the effort.
----Another Releated Suggestion----
I see confusion occasionally in mail lists for variables in string. Since parser behaives
differently when parsing variables in strings.
This may be one of the reason why '->','[]',unary'+/-' is not in
the precedence section. They wouldn't work when they are in a string. (Some of them work with
newer PHP, not recommended(?) syntax, though)
How about describe these differences in the manual also?
------------------------------------------------------------------------
[2001-06-27 01:49:36] danbeck@php.net
Changing description to be more meaningful for someone who wants to tackle this.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=9983
--
Edit this bug report at https://bugs.php.net/bug.php?id=9983&edit=1