Which is better, PHP or Python? Why?

Chamindu Hansajith - Aug 23 - - Dev Community

If you are building your application without regard to job prospects, I would choose PHP. Laravel is excellent, PHP 7 and Hack are insanely fast, and the PHP package library Packagist has become the third most popular package library behind Java’s Maven and the goliath that is NPM. Quantity is not quality, but quantity does indicate energy, which is critical for the long-term viability of a language and its tooling.

I see a lot of nonsense about PHP in these answers. Like: PHP doesn’t have namespaces, “1” = 1, etc. etc.

So, it seems like a lot of information about PHP here is written by people who didn’t see PHP code. But, yes, some people described PHP4 and now we have PHP 7, so I understand why it was written here. But I don’t understand why many people see Python as more readable and elegant. Maybe it is a subjective feeling, but I see the PHP syntax more elegant and more readable:

When I look at the code of PHP, I immediately see variables: $variable. The $ sign is great and I use it in Javascript for variables too. Because there is a huge synoptic of the code I can write the code much much faster.

The same with brackets:

public static function abc() {

}

if ($a == $b) {

}

Brackets are something that makes my code so much more readable. To see “function”, “for each “, “for“, “while“, and “if“ where it exactly begins and ends, is something that makes my code writing so much fast and synoptic. Ok, we can agree, you can do the same with PHP like with Python, so then why not use something that you can learn quickly and that is much more readable? Ok, of course, you miss some functions and principles in PHP in comparison to Java or C++ but if you do OOP, you can write/read the same syntax code for PHP, Java or C++.

PHP, Java or C++ syntax is for ME (maybe subjective) much more readable and elegant than Python syntax (I don’t understand why people with a Java background should go with Python, for me Java is much more similar to PHP than Python. And of course, if you are a Java programmer why use PHP or Python, just use Java).

When I see OOP PHP code written by someone other, thanks to its syntax I can quickly get information about what the code does. When I see it in Python, this takes a lot of time to understand. I wrote many programs in LISP or C so I know what it means to write very briefly but if I need to read code written by someone other I like the PHP syntax.

If you want cheap developers for your project, PHP is better since there are a great many cheap PHP developers available from off-shore development houses. Similarly, if you are working with either WordPress or Drupal, PHP is the name of the game, and knowing it deeply can turn you into a website wizard.

I just don’t want to say, don’t use Python. Everybody is different and everybody likes another style of programming. I just wanted to say why I like PHP more than Python. Visit my my site vegamoviesapk

. . .
Terabox Video Player