Thread: Use a Function
View Single Post
Old 02-03-2013, 11:51 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,752
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Your question isn't clear.
Given that you are using PHP 4 syntax for your objects, you can simply assign an object property directly to a variable. So to answer your question, yes since you have a var scoped variable which is an alias to public in PHP 5, you can simply assign it to another variable.
Public access to object properties in languages like PHP isn't exactly wise though. Since it is datatype weak, you have no way of enforcing the proper datatype to be used unless you use setters and getters.
__________________
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm'); 
Fou-Lu is offline   Reply With Quote