note 17466 modified in language.variables.scope by irc-html

From: Date: Mon, 17 Dec 2001 02:43:30 +0000
Subject: note 17466 modified in language.variables.scope by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22954@lists.php.net to get a copy of this message
When defining static variables you may use such declarations: static $var = 1; //numbers static $var = 'strings'; static $var = array(1,'a',3); //array construct but these ones would produce errors: static $var = some_function('arg'); static $var = 2+3; //any expression static $var = new object; [Ed: You can, however, use: static $var = (some_function('arg')); - irc-html ] --was-- When defining static variables you may use such declarations: static $var = 1; //numbers static $var = 'strings'; static $var = array(1,'a',3); //array construct but these ones would produce errors: static $var = some_function('arg'); static $var = 2+3; //any expression static $var = new object; [Ed: You can, however, use: static $var = (some_function('arg')); - irc-html ] http://www.php.net/manual/en/language.variables.scope.php

« previous php.notes (#22954) next »