variable scope question (extended)

From: Date: Thu, 07 Dec 2000 14:42:28 +0000
Subject: variable scope question (extended)
Groups: php.dev 
Request: Send a blank email to php-dev+get-40379@lists.php.net to get a copy of this message
I am trying to make a variable in PHP4 that will be scope-wise comparable to a private class variable in C++. If I declare a simple class variable, it can still be referenced by the class pointer by packages that include it. If I declare the variable as global within a function, the variable is global even to packages that include the class. If I just make a local variable in a function, then I can't reference it outside that function within the class. **I would like to have a variable that can be referenced by multiple functions within my class, but not by anything outside the class. Has someone found a way to do this? -- Barbara E. Lindsey, University of Florida Childrens Oncology Group (COG) Phone: (352) 392-5198 ext. 314 Fax: (352) 392-8162

« previous php.dev (#40379) next »