Building Web Services with PHP-PEAR: devChannel

Lately I have been doing a bit of object oriented PHP stuff just to see how "object" it really is and to learn that aspect of PHP. Its actually very impressive, it has inheritance, constructors, member variables and member functions and such. But it does lack true encapsulation, reflection and much more. Its not nearly perfect but it is "mature" enough to be very useful, much more so than just function libraries in include files (and PHP 5, which is still beta is supposed to improve things greatly, such as with a reflection API).

At any rate PHP is still IMHO the best technology in play for relatively small and simpler type web applications (although the simple part is certainly debatable). The reason is the environment that is required. You dont need a special "container" or a JVM for that matter, you dont need a particular operating system to run it on. You can have a shared virtual host setup with ease (as compared to java) and you dont need special development tools or for that matter even have to "compile" any code. Its not as scalable or robust , in other words "enterprise" capable as Java but its fast, its capable and its EASY.

So that said just how much really cool stuff can you do with PHP? Well how about XML processing, sockets, SOAP, ie Web Services? Sure thing.

The linked devChannel article is a great example of just how capable PHP is. Using the PEAR (PHP Extension and Application Repository) libraries PHP is a complete web services solution. The article is a good background on web services and uses OO PHP.

For more see the links.   Building PHP Web services with PEAR: devChannel