by pavel_lishin · 1y ago · 0 comments
I haven't seen too many PHP codebases in the past decade, but every one has been full of a mix of commits that are beautiful, clean, functional code... and just the worst mishmash of garbage I've ever seen.
PHP might be fine, but I'm still not sure if I'm ready to work with other PHP developers.
It was typical PHP mix of HTML and PHP code in one file, an unreadable sequence of several crazy long HTML lines, then several lines of PHP code, then again HTML.
Lots of copy paste.
SQL statements were created by concatenation of user input with the text of the query. In 2018.
Back then I promised I'll never ever touch any PHP code. Live pretty much happily since then. I know there's some typing added to the language and other modern features. Still pretty sure, that if I open any random PHP file from any random PHP project, I'll still find the same mess as ever before.
I think it was a huge mistake to allow mixing code and HTML. On the other hand, without this feature, PHP probably wouldn't become popular at all.
More seriously I picked php because it lets me get away without having to strictly define anything and just get away with fuzzy logic. I want to jump on the bed god damn it!