PHP and Python comparison (PHPvsPython)-PHP source code

Source: Internet
Author: User
Ec (2); here, I have recorded some articles and discussions on comparing PHP and Python, so that we can look at the advantages and disadvantages of PHP from another perspective. As a scripting language, the underlying layer is also developed by the C language. Python is OO, and PHP is OO now. Python is a versatile (applicable to desktop and web applications), and PHP is specialized in web applications. When PHP is still worried about how to integrate it into large programs, Python has long been compatible with Java ,. NE script ec (2); script




Here, I have recorded some articles and discussions on comparing PHP and Python, so that we can look at the advantages and disadvantages of PHP from another perspective.
As a scripting language, the underlying layer is also developed by the C language. Python is OO, and PHP is OO now. Python is a versatile (applicable to desktop and web applications), and PHP is specialized in web applications. When PHP is still worried about how to integrate it into large programs, Python has long been compatible with Java ,. . NET ....

* Python is more readable and easier to maintain than PHP;
* The development of PHP has a backward compatibility problem, and Python does not exist;
* At the bottom of the entry threshold for PHP, Python is relatively high (in fact, the Python language is quite simple, it is difficult to have the idea of OO, and PHP faces the same problem after being OO );
* Up to now, there have been a large number of servers that support PHP, and fewer servers support Python (as the hardware cost decreases, it is estimated that the situation will change soon ).


Someone once said that the underlying architecture of PHP is not suitable for OO, so why is Python so good for OO?
Someone once said that PHP is slow to use OO. Why don't Python users feel slow?

I personally think it is a good thing for PHP to use OO. But after reading Python, I feel that PHP has implemented more OO functions and methods than Python. Is it good or bad? Can it be well carried as a scripting language?

It seems that PHP is a bit like C ++ in the past. It must be OO-oriented and compatible with C, making it more complicated. Python is a bit like Java in the past. It was originally oriented to OO and based on the scripting language, it simplified the features and methods of OO and did what it could do.

PHP is easy to learn and named. Now, for enterprise-oriented applications, if we do something like C ++ that requires compatibility and almost full copy of Java's OO functions, it will inevitably become complicated, will it be replaced by other languages in the future?

You can attack the jade. Should we learn Python and get some inspiration from it?

Now, when everyone is optimistic about PHP, I seem to feel the cold wind behind it with all kinds of traces ,... Hope is only for your own worries.

From the perspective of PHP development, I think the best way to do this is to popularize and promote PHP applications in China, and first occupy the market, therefore, I wrote a suggestion (connection), but it seems that it is also dead...

========================================================== ========================================
Part 1: Introduction to Python
What is Python?

(Http://www.okpython.com/bbs/thread-73-1-1.html)

Python is a programming language that is freely available and that makes solving a computer problem almost as easy as writing out one's thoughts about the solution. it can be written once and run on almost any computer without needing to change the program. in this section, you can learn more about what Python is, how it is used, and how it compares to other programming languages. use the menu below to browse the various sections of this article.
Python was first created by Guido von rosum in 1990 and was named after the Brit-com Monty Python's Flying Circus. it has since been developed by a large team of volunteers and is freely available from the Python Software Foundation. the most recent version of Python, 2.5, was released in September, 2006.

Python is now found in many incarnations. at the website of the Python Software Foundation, Python is written in C. other incarnations exist. A Java-based version of Python exists in Jython and may be used to work with Java c

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.