Question:
Why would you choose Python over PHP for web development? or vice- versa?
Benon
2012-01-29 00:26:13 UTC
I just got into web development, and there is still a lot I want to learn. However, I looked at python and think its an easy language, but I think most websites are PHP based? what is your preference and why?
Four answers:
anonymous
2012-01-29 00:40:20 UTC
It is not an either/or choice. They are different tools for different jobs. Frequently both are used. argv can pass values between the two.
greenforestlt
2012-01-29 07:22:36 UTC
Something popular does not mean it automatically is the best imho.

I chose Python because:



* Easy first language to learn (even easier as not the first one, I guess)



* Very high-level language



* Very advanced Python web-development frameworks (Django, Web2Py, Pylons, etc.)



* Large field of application- for system administration, gui apps, web development, gluing different apps together, lots of open-source apps use Python as a built-in scripting language (for example Gimp, FreeCad, OpenOffice), writing some simple scripts quickly for yourself (for example, to make a backup of important files).



What I don't like about php is it has serious security problems and is not much object-oriented. Perhaps someone else will tell more about its advantages.
Catherina
2012-02-01 02:22:06 UTC
Both Python and PHP have their own advantages and disadvantages. Ofcourse, PHP is the most popular open source programming language.



Depending on your requirement you could choose one of them, look at your requirement and then you could decide which to go with. Also, you can search in Google "python vs php for web development" and you can find many good articles on this, just go through and come to conclusion.



1. Python and PHP have different language syntax - php systax like C where Python syntax is similar to pseudo-code.

2. PHP offers more than one way to accomplish a single task which python does not.

3. Lambdas is special tool of Python that makes it easy to create and flow



You can also find very similar discussion here:

http://stackoverflow.com/questions/3820659/using-python-vs-php-for-web-development-when-and-where



http://www.techworld.com.au/article/398573/python_vs_php_choosing_your_next_project_language/
jonasson
2016-10-04 13:31:25 UTC
Hypertext Preprocessor shares comparable syntax with C++, Java, and C#. as quickly as you study Hypertext Preprocessor, you could actual study any of the above, jointly as Python has greater of it somewhat is very own style. although you're able to do merely approximately something with Python, issues might seem counterintuitive as quickly as you progression to different languages to boot Python.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...