by astrodust · 13y ago · 0 comments
Python is useful for a lot more than web scripting, and so is Ruby.
For example, if you wanted to add real-time connectivity to your app using something like Socket.IO (http://socket.io/) you're basically out of luck in the PHP world (http://stackoverflow.com/questions/6398887/using-php-with-so...), you'll have to do it in a different language.
I think people who invest a lot of time in learning PHP are getting less bang for their buck than they would learning Ruby or Python where their knowledge can be applied to broader disciplines.
Do you need to process audio files? Maybe write a quick script to scaffold some Objective-C or Java code for your mobile app? What about writing a persistent process that watches for files on your network, processes them and uploads them to Dropbox?
All these things are really easy with Ruby, Python, or even NodeJS, you just glue together a few off the shelf modules and you're basically done. PHP is way out of its element in these sorts of situations.
A quick and easy to digest example of an implementation of memcached in PHP: https://github.com/AndrewRose/cached.php
The libevent bindings are pretty wobbly in most languages other than C, with the exception of things like NodeJS. Plus, that project is pretty much abandoned.
PHP comes with a CLI SAPI that allows you to use it on the command line just like python, ruby etc and has done so since version 4.2.0 (released April 2002). I've written and maintained many cli tools and deamons in PHP over the last 11 years with great success so please get your facts straight before perpetuating falsehoods .. sorry, but I'm getting pretty sick of the ill-informed PHP bashing going on round these parts.
I think you're misunderstanding what I'm saying.