note 104716 added to language.operators.precedence

From: Date: Sat, 02 Jul 2011 16:29:51 +0000
Subject: note 104716 added to language.operators.precedence
Groups: php.notes 
Request: Send a blank email to php-notes+get-181179@lists.php.net to get a copy of this message
( - the function call operator - has higher precedence than ++ and --, but lower precedence than [. Therefore you can do the following: <?php $func[0] = 'exit'; $func[0](); ?> But the following will cause a syntax error: <?php function func() { return array('string'); } func()[0]; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 92.230.243.105 ---- Manual Page -- http://www.php.net/manual/en/language.operators.precedence.php Edit -- https://master.php.net/note/edit/104716 Del: integrated -- https://master.php.net/note/delete/104716/integrated Del: useless -- https://master.php.net/note/delete/104716/useless Del: bad code -- https://master.php.net/note/delete/104716/bad+code Del: spam -- https://master.php.net/note/delete/104716/spam Del: non-english -- https://master.php.net/note/delete/104716/non-english Del: in docs -- https://master.php.net/note/delete/104716/in+docs Del: other reasons-- https://master.php.net/note/delete/104716 Reject -- https://master.php.net/note/reject/104716 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181179) next »