What is better as a scripting language: PHP-CLI or Python?
What is better as a scripting language: PHP-CLI or Python?
My website already runs PHP for it's UI. I now need to code some scripts which will fetch data from certain URL's on a daily basis, parse the XML it fetches and populate the database with the data it extracts.
If PHP 5, with its enhanced object oriented features and rich libraries is on par with Python on the command line, then wouldn't it make better sense for me to use PHP for both web and CLI/GUI development?
But, I can't ignore the fact that people do use python almost exclusively for high level CLI/GUI scripting.
Which of them is a better choice?
3 comments
[ 2.5 ms ] story [ 20.4 ms ] threadI have php scripts that run on the command line that run for long periods of time. I have also found a lot of ways to reuse code originally written for our website.
I don't know about memory consumption problems, but I have php scripts that are coded functionally (not OO) that run for an hour (processing HUGE amounts of data).