#46590 [NEW]: several operator precedence like things are not clear

From: Date: Mon, 17 Nov 2008 06:13:41 +0000
Subject: #46590 [NEW]: several operator precedence like things are not clear
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1508@lists.php.net to get a copy of this message
From:             chx1975 at gmail dot com
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  several operator precedence like things are not clear

Description:
------------
What does $foo->$bar[3] mean? is $bar an array, of which we take the third
element and the string found therein is the name of the property of the
$foo object. Or is $foo-$bar an array of which we take the third element?

Wthat does new $foo(3) mean? Do we call the function name found in $foo
with the argument 3 or we create a class which name is found in $foo and
the constructor gets the argument 3?

What does $foo->$bar(3) mean? I wont go into the same painstaking detail
as above but I think it's clear that there is a need for the precedence of
() and -> be documented.


-- 
Edit bug report at http://bugs.php.net/?id=46590&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=46590&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=46590&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=46590&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=46590&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46590&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=46590&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=46590&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=46590&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=46590&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=46590&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=46590&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=46590&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=46590&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=46590&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46590&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46590&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=46590&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=46590&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=46590&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=46590&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=46590&r=mysqlcfg



Thread (3 messages)

« previous php.doc.bugs (#1508) next »