RE: [PHP4BETA] A quick clarification question about PHP4...
| From: | Jim Brain | Date: | Tue, 24 Aug 1999 14:38:10 +0000 |
| Subject: | RE: [PHP4BETA] A quick clarification question about PHP4... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3682@lists.php.net to get a copy of this message | ||
This goes to show that if you try to save a few letters when asking a
question, you lose....
After reading the answers, and rereading the compatibility list, I realized
that you all are talking about static variables, which I never use...
(Sorry, but haven't found a real reason to...)
However, I do use class member initializers all the time, I think....
Class junk
{
var $name;
var $password;
var $info;
var $array=array();
function junk($name,$info,$password,$array)
{
$this->$name=$name;
$this->$info=$info;
$this->$password=$password;
$this->array=$array;
}
//...
}
Is this code legal in PHP4? Note that the init code could get an array to
stuff away?
If not, how must it change?