ID: 9983
User Update by: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Old-Bug Type: Scripting Engine problem
Bug Type: Documentation problem
Description: String concatination

I read precedence list again. There is "." operator listed and has higher precedence 
than "?:" operator. So PHP is working as expected. I didn't see "." It was hard to see 
on my browser. Thanks.

Anyway, I have suggestion for the manual page, so I changed status to open as 
"Documentation Problem".

I think the manual page better to have relevant language constructs in the precedence 
list even if it is not a actually a operator in PHP. (Such as "()", "{}", "::", "->", 
unary "-","+". It seems these are not a operator in PHP, since they are not listed. 
Not sure though.) Only "()" is described in the section. All of them affects how 
expressions are evaluated in script and I think precedence for these is important as 
operator precedence because programmers want expressions are evaluated as expected. 

How about change the section title from "Operator Precedence" to "Precedence"? Then 
documentation can include anything that can affects expression and still have 
consistency with section title.

It also would be nice to have a little explaination for each operator in the 
precedence list. Since it is ambigous if listed operator is unary or binary. For 
example, unary "-" should have higher precedence than binary "-". It would be obvious 
for most users, but it may be usuful for someone.


Previous Comments:
---------------------------------------------------------------------------

[2001-03-26 03:46:52] [EMAIL PROTECTED]
Please read this manual page:

http://www.php.net/manual/en/language.operators.precedence.php

--Jani


---------------------------------------------------------------------------

[2001-03-26 00:17:05] [EMAIL PROTECTED]
Following code, needs "()" to get expected value. 

$bar = true; 
$str = "TEST". ($bar ? 'true' : 'false') ."TEST"; 

Without "(" and ")", only "true" will be in $str. 
(PHP4.0.4pl1/Apache DSO/Linux, PHP4.0.5RC1/Apache DSO/W2K Server) 
If this is expected behavior in PHP, it would better to be described in the Manual.


---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=9983


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to