On basic features of PHP and Python _php tutorial

Source: Internet
Author: User
As we all know, PHPis an HTML-embedded language, and Pythonis an object-oriented, literal translation of computer programming language, but also a powerful and perfect general-purpose language.

Here are some descriptions of each of the two languages of PHP and Python, which may help you choose the right language for your project.

See the PHP and python:php issues

I gave up PHP because of the first language. PHP is not really a language, but a huge plug-in structure that shows low-level libraries in a high-rise form. The language that most developers use is actually the C function (curl, MySQL, GD, etc). Packaging, usually their libraries are very simple to display. Thus this results in inconsistent API for PHP.

The second problem with the PHP language is the management of the language. The PHP language was actually designed by the Commission, and no one came up with any consensus criteria. Pear has its own standards, PHP has its own standards, which makes SPL classes more Java style, and pear is very different.

For more than 11 years in PHP development, I've known many expert developers in the field of PHP, and they have a lot of ideas about PHP. In addition to the Committee issues mentioned above and the problem of standard confusion, because of the wide use of PHP, backward incompatibility has caused significant damage to the code.

Another point to mention is that PHP lacks many of the features of modern languages. Now again, Python:

The beauty of PHP and Python:python

The Python language is created in almost the exact opposite way of PHP. First, Python was led by benevolent dictator and Guido van Rossum, whose development, management, and long-term operations would be well-maintained by a single-person-dominated language.

Guido and Python's core developers create standards through PEP, and show how standards are created through public interfaces. Also, Guido does not appear in the language layer if the language feature is not good enough (such as without the + + operator and is not assigned in the comparer).

The continuity feature extends to the entire Python community, so it's hard to see how Python differs from one project to another.

One of my favorite Python features is its clarity. When I open a file in Python, I will clearly know what kind of code is in it, I think this feature is very useful when I am overwhelmed by this point in PHP many times.

In short, Python has a very good system-level feature.

Another great feature of Python is its straightforward nature. Need a namespace (namespace)? The name of the file is the namespace; need a module? Just replace with a __init__.py file; you need to rename the feature? Only New_func = Old_func.

I hope that through this article on the introduction of PHP and Python, can let everyone have a deeper understanding.


http://www.bkjia.com/PHPjc/445744.html www.bkjia.com true http://www.bkjia.com/PHPjc/445744.html techarticle As we all know, PHP is an HTML embedded language, and Python is an object-oriented, literal translation of computer programming language, but also a powerful and perfect general-purpose language ...

  • 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.