Web Hosting, Design, & Coding forum

General discussion

PHP Classes

by JaaBlaze / March 1, 2008 12:33 PM PST

I'm a bit of a noob to PHP, or server side scripting in general. Everything that I know I have taught myself so far. To my understanding PHP Classes are just a collection of functions. Can someone tell me the advantage of using PHP classes?

Discussion is locked
You are posting a reply to: PHP Classes
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: PHP Classes
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
That's OOP and more.
by R. Proffitt Forum moderator / March 1, 2008 9:33 PM PST
In reply to: PHP Classes
Collapse -
From a spamming poster.
by Kees_B Forum moderator / October 9, 2014 7:43 PM PDT
In reply to: PHP Classes

"Classes are used for representing data as objects. If you're representing something like a user's data, or an auction bid, creating a User object or Auction-bid object makes it easier to keep that data together, pass it around in your code, and make it more easily understandable to readers. These classes would have attributes (data fields like numbers, strings, or other objects) as well as methods (functions that you can operate on any class).

Classes don't usually offer any benefits in terms of performance, but they very rarely have any negative effects either. Their real benefit is in making the code clearer."


Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?