Re: [PHP4BETA] A quick clarification question about PHP4...

From: Date: Sat, 28 Aug 1999 02:40:51 +0000
Subject: Re: [PHP4BETA] A quick clarification question about PHP4...
Groups: php.version4 
Request: Send a blank email to php-version4+get-3792@lists.php.net to get a copy of this message
Jim Brain said: > As for the init code, it seems you really can't pass anything useful to an > init function, which implies that: > > $jim=new junk; > > Would work better than > > $jim=new junk(); I'm not sure why you wouldn't want to pass stuff there. For example, this seems useful, and works fine in PHP3: -------- class myClass { function myClass($name) { $this->myVar = "Hello, $name!"; } } $myInstance = new myClass(Scott); echo $myInstance->myVar; -------- Maybe I missed something in this exchange? - Scott

« previous php.version4 (#3792) next »