note 110672 deleted from language.variables.scope by aharvey
| From: | aharvey@php.net | Date: | Thu, 22 Nov 2012 00:29:18 +0000 |
| Subject: | note 110672 deleted from language.variables.scope by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192067@lists.php.net to get a copy of this message | ||
Note Submitter: Ray.Paseur often uses Gmail
----
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);
}