object oriented programming with php
Why would anyone choose PHP for object oriented development? Well here are some possible reasons: easy to find cheap hosting that allows php, its an established language with lots of libraries (pear, pecl, etc). What are some road blocks you will run into: its still a bit dodgy but php 5 is still much better than php 4. What is the future: php version 6 = java? :^P
If it wasn’t for OOP (object-oriented programming) I wouldn’t even be a programmer; OOP is what got me hooked on coding.
Over the years an open source OO PHP library has been developed by phpfunk.com and you can read more about it in the object oriented php category.
Whats with the long class names?
You’ll notice our PHP classes have names like PhpFunk_DB_DBWrapper. One of the goals was to not hog the global namespace. For example if two different people create a Widget class in a file called Widget.php, how can you distinguish between them. They probably do very different things. By naming each class following the standard VendorName_PackageName_ClassName you are assured to not have such conflicts. Then you put the file in a directory structure like this: VendorName/PackageName/ClassName.php.
Several packages in the PhpFunk library have officially been “released”. All of these classes are at work in production websites. The complete API can be found here.


