Home arrow PHP arrow Page 2 - Introduction to PHP Classes (OOP)

Introduction to PHP Classes (OOP)

Eric has create an article to help our readers learn how to correctly use object orientativity in PHP by the use of PHP classes.

Author Info:
By: Eric 'phpfreak' Rosebrock
Rating: 4 stars4 stars4 stars4 stars4 stars / 38
April 22, 2003
  1. · Introduction to PHP Classes (OOP)
  2. · The Summary

print this article

Introduction to PHP Classes (OOP) - The Summary
(Page 2 of 2 )

As I said earlier, classes have been proven to be very efficient. They are the gateway to "Object Oriented Programming" or OOP as some people like to call it. With OOP, you can dramatically save yourself a lot of time and also create an archive of objects or classes that you can use over and over.


If you don't mind, I'd like to give you a homework assignment using Classes. This will show you a very practical use of a class and something you will probably find yourself using over and over again.

Your homework assignment is to create a class that uses the mail() function. Some people (like me) have a hard time remembering mail() headers and I find that putting them into a class can really save yourself a lot of time.

I recommend that you create two or three functions inside your class. One function should send HTML mail and another should send plain text mail. You can add another function that allows you to send file attachments and so on. You'll find this will be very useful in your every day tasks.

Please don't email me your homework :) If it works for you, then you passed! If not, uhmmm, keep trying :)

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials