PHP is fine. I have been using it for 5 years. My intro into it was with Symfony and a best practice doc so I got to see how good it could be used. PHP has some quirks but overall it is easy to develop with for both web and non-web tasks.
Now the problem with PHP more than some other languages is it's opportunity for abuse. The other day we upgraded to php 7.2 and some things broke. It turns out you used to be able to declare a string and used it as a associative array (hash map).
//please never use this, it is bad :( and will actually not work in php 7.2+$myArray="";$myArray["product_id"]=12345;
PHP is littered with weird things like this, but ultimately it is up to the developer to not do dumb things.
PHP is fine. I have been using it for 5 years. My intro into it was with Symfony and a best practice doc so I got to see how good it could be used. PHP has some quirks but overall it is easy to develop with for both web and non-web tasks.
Now the problem with PHP more than some other languages is it's opportunity for abuse. The other day we upgraded to php 7.2 and some things broke. It turns out you used to be able to declare a string and used it as a associative array (hash map).
PHP is littered with weird things like this, but ultimately it is up to the developer to not do dumb things.
This code will generate big problems in future. Never use it.
I'd never! That does not stop others though unfortunately.
Please add comment "Never do this!" into this part of code. Somebody may read this like a pattern.
Why this code is bad?
String is not an array.