This is a discussion on "Object Oriented Programming with PHP?" within the PHP Forum section. This forum, and the thread "Object Oriented Programming with PHP? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Object Oriented Programming with PHP?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Object Oriented Programming with PHP?
I am being trained to write Java. It's wonderful! Now however, I am seeing this "Object Oriented PHP" and want to know, is it just like Java? I know the code is PHP, but do you just call an "Object" by using an include and let it run its course? If so, I am going to start doing this because it just makes more since than copying and pasting files from my library over and over again.
Anyone do OOP PHP? If so I'd love to hear tips and or comments!
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
|
|
|
||||
|
Re: Object Oriented Programming with PHP?
Not really like JAVA.
Less strict and yet restrictive. You can' inherit multiple classes. here is some pseudo code:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Object Oriented Programming with PHP?
AHHHHHHHHHHHHHHHHHHHHHHHH! That is so fricken cool! I am so going to go learn how to do this!
couple of quick questions though: 1) Where do you store your classes? Can you make a file that has these that you can just import into any page that needs to access them? 2) Do you know where some "Good" resources for this are? Because google shows many resources but finding a good one is rough.
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
|
||||
|
Re: Object Oriented Programming with PHP?
1. Depends on whether you are using PHP4 or PHP5.
If the former (and hopefully), then you can use the awesome fantastic magic function __autoload(); This function will automatically load the class if you haven't included it. Google __autoload for more info. 2. I have a book but I did know of some good sites, I'll let you know soon.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Object Oriented Programming with PHP?
Sweet! Thanks.. I posted this when you were online because I noticed you mention something about OOP PHP a while back in a post.
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
|
||||
|
Re: Object Oriented Programming with PHP?
Yeah I love OO PHP!
Luke's OO PHP article should help.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Object Oriented Programming with PHP?
Nice article. Wow, one found in the webforumz newsletter even.. maybe I should read that thing! haha, thanks again!
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
|
||||
|
Re: Object Oriented Programming with PHP?
You may like this thread also Classes in PHP
And the newsletter is awesome!
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Object Oriented Programming with PHP?
I started off on the Newsletter team working on a CMS for it, but business picked up that month and I just ran out of time. I believe you were my replacement :P.
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
|
||||
|
Re: Object Oriented Programming with PHP?
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Recursive programming in php | masha | PHP Forum | 4 | Oct 1st, 2007 12:37 |
| programming-designs.com | programming-designs | Free Web Site Critique | 5 | Aug 27th, 2006 19:31 |
| ASP/SQL programming help | squashed_Frog | Classic ASP | 3 | May 15th, 2006 03:49 |
| Dynamic Database oriented menu | arora.a | ASP.NET Forum | 3 | Feb 27th, 2006 13:16 |
| NewBie to Web Programming | ruwanr | Introduce Yourself | 7 | Dec 1st, 2005 20:32 |