What are the main differences between Python and PHP?

I know a little PHP. But Python is completely new to me. I only know something "similar," right? Or wrong? What are the differences I should know?

+3
source share
3 answers

Here is the python wikipedia link. It highlights the main differences and common elements: http://wiki.python.org/moin/PythonVsPhp

+15
source

PHP is a language created for the web. You can create GTK and CLI applications with PHP, but are mostly used for websites. Python is used for many things, such as websites, web servers, game frameworks, PC and CLI applications, IDEs, and more.

. PHP , , C , . Python , .

. , .

+13

One major difference is that code formatting (indentation) affects the behavior of your Python codes. PHP is not interested in how you format your code.

In addition, PHP can create applications outside of web servers and the CLI, but it specifically targets these two environments, while Python is more "overwhelming."

+1
source

Source: https://habr.com/ru/post/1726175/


All Articles