note 110672 added to language.variables.scope

From: Date: Wed, 21 Nov 2012 15:40:10 +0000
Subject: note 110672 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-192056@lists.php.net to get a copy of this message
Static declarations cause a parse error if there is a concatenation. <?php // RAY_static_error.php error_reporting(E_ALL); function static_ok() { static $abc = 'ABC' ; var_dump($abc); } function static_bozo() { static $abcd = 'ABC' . 'D' // <==== PARSE ERROR ; var_dump($xyz); } ---- Server IP: 69.147.83.199 Probable Submitter: 98.169.50.31 ---- Manual Page -- http://www.php.net/manual/en/language.variables.scope.php Edit -- https://master.php.net/note/edit/110672 Del: integrated -- https://master.php.net/note/delete/110672/integrated Del: useless -- https://master.php.net/note/delete/110672/useless Del: bad code -- https://master.php.net/note/delete/110672/bad+code Del: spam -- https://master.php.net/note/delete/110672/spam Del: non-english -- https://master.php.net/note/delete/110672/non-english Del: in docs -- https://master.php.net/note/delete/110672/in+docs Del: other reasons-- https://master.php.net/note/delete/110672 Reject -- https://master.php.net/note/reject/110672 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192056) next »