Earlier quoted context omitted.
I have never written JS with semicolons after 2015 idk why you are saying Modern JS has semicolons? I simply didn't get it. Am I missing something.
I mean, it clearly has them; it's part of the syntax. You can skip them, and the parser will insert them for you; but the language has them.
PHP in 2022
211–220 of 318 posts
Re: PHP in 2022
#212Earlier quoted context omitted.
I think unambiguously janky design choices like this[1] in PHP's early history is what's given it such a bad reputation, while it might be a decent language now such a reputation is hard to shake. I'll be honest the only time I'd reach for PHP over a comparable language with a less chequered history like Python is if I was dealing with a project that was already closely tied up in the PHP ecosystem. [1] https://www.i…
Unfortunately the bad design choices from the past are mostly here to stay - I mean, when you have the thing you want to find (the "needle") as the first parameter in about half of your "find something in something else"-type functions and the "haystack" as the first parameter in the other half, are you really going to break backward compatibility just to make things consistent? Of course not! So PHP will never be my…
The performance improvements where not directly sponsored by Facebook.
Re: PHP in 2022
#213I learned to use php when I was like 14. I’m 27 now and still derive such joy when making my own little projects that will never see the light of day. I try to be humble as far as just being a php trash coder, but I don’t feel too ashamed honestly, as it is the most mainstream thing really. I will always be grateful to php for being accessible and yeah, I guess easy. I don’t know why php is the only one I really stuc…
PHP is such a joy that I am really thinking about switching back to it for my day job.
Re: PHP in 2022
#214Earlier quoted context omitted.
Slow change is good for small projects that you want to build once and use for decades without much maintenance.
A language that uses archaic syntax with dollar vars, semicolons, is pretty verbose itself may die before it evolves into something sensible. Not that I believe PHP will die any time soon, but just replying to your "slow is good".
Re: PHP in 2022
#215Javascript is what PHP should be since day 1.
Re: PHP in 2022
#216Earlier quoted context omitted.
You have any good simple examples of your backend? Sounds like what I've been attempting to explain to others. How many concurrent requests and what size of data can you run with a setup as described?
Storing stuff in a json file sounds horrible to me. Why would you want that?
Re: PHP in 2022
#217PHP is my go to language for building simple backends that store data as json in a file and synchronize access using flock(...). There are a ton of cheap hosting providers that support PHP and all you have do to is copy your files over and everything works. I love to focus my energy on building a great frontend with React or Vue.
I've wondered why there's no JSON-based equivalent of SQLite, like "MongoDB but it's just a file and a library."
Re: PHP in 2022
#218Earlier quoted context omitted.
> Why would I choose PHP when starting a greenfield project? For me, the answer is Laravel.
For someone who has never used PHP: what is so good about it?
Re: PHP in 2022
#219PHP is my go to language for building simple backends that store data as json in a file and synchronize access using flock(...). There are a ton of cheap hosting providers that support PHP and all you have do to is copy your files over and everything works. I love to focus my energy on building a great frontend with React or Vue.
I've wondered why there's no JSON-based equivalent of SQLite, like "MongoDB but it's just a file and a library."
Re: PHP in 2022
#220Earlier quoted context omitted.
I'm one of those web devs that tries everything under the sun, and I also happen to have worked for a lot of companies (more than a dozen already, I'm on my 40s). Laravel is such a *joy*. I've never had this feeling of using something so easy and productive. I've been recently building a side project with LiveWire and oh-my-god. I really wish I had discovered it before. From the templating system (you get components…
Laravel and Livewire is the best-kept secret ever because everybody is too busy being biased against PHP.