I consider myself to be a PHP beginner who can write OO PHP code. I've also had experience with Laravel in creating complex application all by myself. But Im not an expert. I dont know design patterns. My code works but it's not written "by the book". It Doesnt follow SOLID principles. Btw. I'm 1.5 year in PHP.
My question is should I stick with PHP and learn SOLID and Design Patterns or should go with some other language?
There are many bad things that can be said against PHP and most of them are true. But the fact is that PHP7 is fast and PHP has huge support / backer (Facebook). Isnt that why PHP is evolving? JS had Google and V8 JS engine. Otherwise there would be no NodeJS. Ruby is beautiful, but its slow. Why? Because they dont have a backer (financial support) to evolve. There were non profit organizations/initiatives who tried to make Ruby faster, but without luck.
My point here is that I kind of like that PHP7 is fast and very good, performance-wise and in my opinion it has a bright future (at least for the next 5-10y). But I would like to hear other opinions.
Regards
I think you should stick with PHP. You are already 1.5 years in PHP and i totally agree with you that PHP7 is fast, good performance-wise and has a bright future.
I am programming in PHP for 15 years now. I have controversies with it. I don't think it is a good language but it is the one I am the most proficient with.
I like PHP but it's not the right tools for everything I want to do. So I know and learn other languages as well.
In the end PHP is my job and other languages are my fun.
As a new programmer (less than 2 years) you could stick with it until you feel comfortable enough to try new languages. New programmers trying different languages at once tend to fail (I've seen too many at work being confused by differences in languages and not being able to go forward anymore...).
I would recommend to actually find out what you like as a Programmer. To find out what you like it's important to experiment and it doesn't matter if you switch languages in the end.
Learn the basics ->
And if you got this in any language you have a foundation to decide what to do.
One of my favourites is the missing KISS ....
I had the question how to write a "playtictactoe.org" game and the CTO wanted to ask me after a job interview of another dev how I would solve it.
Key was: I was using a matrix 3x3 with 3 symbols (x,o,_) to represent the state of the game and he told me that 90% of all candidates try to make an object out of the field which he called overly complex and that's what KISS is all about.
Try to use a solution that is as simple as possible ... you don't have to use a library if you can just use 3 LOC to solve the problem.
I am a PHP developer since over a decade now who has considered jumping ship several times now. I am glad I didn't. To clarify upfront, I am not against learning other languages, quite the contrary actually. But I am glad I didn't abandon PHP when most of the "bad things" said about PHP were true.
Yes, PHP has flaws, maybe has more in its share than other programming languages. I wish PHP's function naming conventions were consistent (also its parameter conventions). I wish it was stricter with arrays. I wish it was stricter with comparisons. And a lot more. I won't undermine efforts required for someone to deal with these flaws but I dealt with them.
I did that because I found a community and saw that a community was much more important than a language's (or framework's) technical features. My experience being involved in PHP community, specifically Drupal, has been - there is no other word for it - awesome. Actually, Drupal (code) was one of the reasons I didn't leave the PHP ecosystem but that is another story.
I have written about my experience with Drupal and other technologies elsewhere (my blog) but it comes down to this:
As someone with experience in multiple languages but not necessarily great at either I discovered my weakness has been understanding design patterns and fundamental concepts. Some people could justifiably suggest that learning another language can inform the big picture for you (big picture relating to programming fundamentals). However other people might suggest that it's fine to stick with PHP and focus on design patterns and broader theory there.
However if your question is about job security, PHP is here to stay although I can't comment on the salary level for PHP devs in the future.
Sky
Coder
Despite the negativity towards PHP, the Laravel project has managed to bring back the demand for PHP. And it's not going anywhere.
You can find new PHP 7.X branch to be reasonably competitive over Ruby and Python frameworks. You can easily check the performance of PHP SQLite Database Connection Example . Compare this with Ruby and Python frameworks basic code. And see how quick PHP is on that note.
I'd recommend you to ignore the haters and learn PHP. Who knows you may definitely find some value out new changes and improvements that are happening.