Liquid Fire Posted July 26, 2007 Share Posted July 26, 2007 I am not putting in O.O.P forum becuase more of a general question. Maybe it is just me or just the code I have looked at but most of the time when i see classes being used in PHP, generally they are just filled with method(function) and no members(variables). And if they do are a member, generally only one and it is some type of database object. Most of the time these methods just return arrays or information. Is there any real good benefit from returning array inside formatting the array in the class into an object and the pass back the object. I mean if you have a class of functions with no member, then you really don't have a class, just a bunch of functions with kinda of a namespace. How do you use classes in php? Do you just use classes to store data your objects needs and not alter any of that information? Quote Link to comment https://forums.phpfreaks.com/topic/61853-class-usage-in-php/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.