Home  >  Article  >  Backend Development  >  What are php and python?

What are php and python?

silencement
silencementOriginal
2019-09-25 16:46:593436browse

What are php and python?

PHP and Python are both interpreted languages. It is generally easier to learn Python after using PHP. After all, many concepts are the same.

Of course, the opposite is also true. If you know Python and then start PHP, it is also very simple.

But if you want to use a frame, you have to use a little more effort.

Here we focus on the language itself and will not discuss the framework for the time being.

Purpose

PHP started as a WEB service and has focused on this for many years, so PHP is a strong point in WEB.

Linux Nginx/Aapche MySQL PHP environment (commonly known as LNMP/LAMP) is known for its simple deployment and efficient performance. It is a must-install package for various server manufacturers.

It can be said that PHP is the best WEB back-end language in the world.

Python started later than PHP on the WEB, so it is slightly inferior in this regard.

However, Python is simple and easy to use, so it has a wide range of uses. It exists in almost every computer field such as operation and maintenance, computing science, artificial intelligence, and WEB.

Especially with the rise of artificial intelligence in recent years, Python has been soaring.

PHP syntax

The file must start with

<?phpfunction helloWorld(){
    $a = &#39;Hello World&#39;;    echo $a;
}

helloWorld();

python syntax

def hello_world():
    a = &#39;Hello World&#39;
    print(a)

hello_world()

The above is the detailed content of What are php and python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn