4 ms·
PHP can be super hacky and super structured, within the same file, and it's your choice. You can have tests, static analysis, etc etc, or not. Or you can start
by thinkindie 3y ago
PHP can be super hacky and super structured, within the same file, and it's your choice. You can have tests, static analysis, etc etc, or not. Or you can start without and then adding it as the project mature, without having to necessarily switch to another language.
I'm working on my own startup that started as a side project and it was super hacky at the beginning, but by sticking to PHP (and thanks to PHP continuous improvements) I was able to refactor little by little and make the codebase way more structured and easier to maintain.
- Shish2k 3y agoAs a vaguely-related anecdote, I wrote a super-hacky PHP script in highschool 20 years ago, it gained some popularity based on being open-source and easy-to-install (PHP’s #1 strength for sure) - and to this day I am still spending a significant chunk of development time refactoring based on ideas that eg Typescript and Rust have out of the box (eg using PHPStan to emulate a language with typed arrays) (I keep wishing that I could rewrite it in a “better” language, but there is no other language that is even in the same ballpark when it comes to “any random user can upload this .php file to any random web host and expect it to work”)
- lmm 3y agoYou can write any kind of code in any language, but going against the grain of that language tends to go badly. Even if your style works for you, if it's not what the ecosystem expects you'll have trouble using libraries, you'll have trouble onboarding new hires, ....
- mp05 3y agoZuck wrote a super hacky PHP script 20+ years ago and now he's a gazillionaire.