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

From: Date: Tue, 24 Aug 1999 20:00:13 +0000
Subject: RE: [PHP4BETA] A quick clarification question about PHP4...
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3690@lists.php.net to get a copy of this message
[Jim Brain>] I didn't mean to start a war, just wanted to know what I should do. As it is, I am going to restrict passing variables in the init code, since I can't see how I could pass them in a way that would not break. As for the var stuff, are you saying that: Class junk { function junk() { $hi="jim"; } } would then create a var called $hi in the class (as if I had done a var $hi global to the class) which I can thenuse elsewhere as $this->hi? 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(); Since the latter begs to have args in the list... Maybe it needs to be left in for compatibility reasons, but us developers are a twisted group. If it looks like a function, we'll pass stuff to it. The only downside to all of this discussion is that I wrote my entire company's Intranet in PHP3 and put vars in most of my constructors (my DB class gets the DB, UID, and PW when constructed, which will be a bummer to rewrite...). Jim

« previous php.version4 (#3690) next »