What to choose Python(Django) or PHP(Laravel/Yii)?

Hello! In advance, sorry for maybe stupid question. I am a student of 4th year and realized that I like programming and in particular web development. So I wanted to ask You what is better for PHP(Laravel/Yii) the University has recently started a course on the web which leads the teacher working in the web and he writes in PHP, so I'm looking towards this language in particular in the direction of frameworks Yii/Laravel (I mean that if you move in the direction of PHP that is, a man allegedly mentor), but I'm a little touched Django and I liked it, however I did a simple blog (and then the coach will not, and will have to learn himself), I don't know what to choose, please help and explain why this language and framework to choose. Thanks in advance.
June 14th 19 at 18:13
8 answers
June 14th 19 at 18:15
What to choose Python(Django) or PHP(Laravel/Yii)?

When people were asked "which Linux is better?", one wise man said - it is better that Linux, who knows Your friend sysadmin.

Here the situation is quite similar, to teach (to start) is better that You ready to teach Your mentor (on account of mentor in the Institute - I personally doubt it, but you know how it there at You personally - I can't).

The second point - looking for what to teach? What You want to do in the end? Blogs? This by far Django/Python is better suited. Do you want to work? In which country? For example, in the United States will, by definition, the popular C# in all its forms and manifestations, as vendor .NET platform itself is in the same country, with all the consequences... as soon As determined with a country/where you want to work, go to local freelancers and see the number of work. It is clear that artists will be more, etc., and an average of +/- one unit of each technology will be approximately equal to the number of performers, but the popularity of technology N involves not only the performers and sponsors and those who eventually promotes the project of adding to the community of end-developers.

The only thing I start is not advised is with Yii, as the vector of its development unclear, it is already more than 3 years hanging in version 2.0 and when it will be 2.1 or 3.0 (and whether at all) - is not clear yet. Personally, I one time went and I am glad it is. But this is a personal experience and there are a million people that will be with full confidence to prove that I'm wrong.

I personally would recommend to learn from either Laravel or Symfony (preferably both, and in General, these frameworks have much in common on the part of the innards), if you're going to the "club PHP-schnick".

As already announced by the previous speaker - in PHP there is one advantage and disadvantage in one. It is with the very first version was developed for creating web-projects (Aki "sites"), at the time - for sites that were relevant then, in our time - for websites (backend web projects) that are relevant now. And its direction is very evident in practice... in PHP, in the history of its existence came just an incredible number of web frameworks, "bad" die, those that "better" still live, etc. Probably number of PHP frameworks (web direction) can be compared with the number of programs in which Python is embedded as scripting language...

Python in this respect was originally developed as a General purpose language and make it not only web/sites, it is often used literally, "everywhere", for example - is it part of the 3D-editor of "Blender3d", it not infrequently acts as a scripting language in large and complex programs, it is not rarely write prototypes of large programs and so on. Accordingly, the versatility of language - the same "two-edged sword", and with PHP, only "the other side".
June 14th 19 at 18:17
I'm more familiar with the Python ecosystem, so you can be unfair to PHP.

- easier work
- easier hosting
- language for web development

- easier debugging
- easier readability
- simpler security code
- the General purpose language
- a lot of different libraries

The performance of both languages are comparable and significantly improved in PHP 7 and in Python 3.6.
June 14th 19 at 18:19
Plus Lara, now with the release 7 version of PHP has experienced a rebirth, fast, convenient, easy to start language. To Python somehow the soul does not lie, although it is the same as PHP is suitable for web development. Increasingly looking at the learning GoLang. I think he is developing well.
June 14th 19 at 18:21
Do not forget that the web is not only a server but also the client, that is you also need JS in parallel to master in order to be competitive in the market.

Would recommend to start with laravel, so if you want a framework + learning JS basics. Then try slim/lumen API on the server with ReactJS/VueJS on the client.
Well acquainted with design patterns.
June 14th 19 at 18:23
Oh, man... Now everyone will praise the bog. If you choose Jango - well done. If you go on the PHP side, it is better to look in the direction of Symfony. But in General... you have to understand that you is more to liking
I know about the outrage, but I would like to hear the pros and cons of each solution from people with experience - shawn.Gaylo commented on June 14th 19 at 18:26
June 14th 19 at 18:25
php is developing by leaps and bounds in OOP programming. there were of course early, sophomoric language, but now is a powerful tool for web developments.
if you write in the web industry, don't worry) choose PHP, if by web what it is still Python - shawn.Gaylo commented on June 14th 19 at 18:28
June 14th 19 at 18:27
Focus on vacancies. Go to where they pay more. Because of these two technologies on which to write the difference is not unless you write machine learning.
June 14th 19 at 18:29
I am for Python. But in the regions it is very bad. If not restricted in the choice of vacancies in your city, that do not care about this restriction.
I always thought I'd be working with a clean web, but fate now work with a lot of sockets, it is low level. And I don't need to switch from one language to another.

About the performance:
Program in Python that program in C, almost all libraries are written in C, in Python usually describes only the logic of the program, all heavy processes not Python. With almost no need to think about how it works.

Find more questions by tags PHPPython