If operator overload doesn’t happen by making operators into functions, PHP might have a chance to not be completely and utterly messed up by anyone, for any reason.
Rogue: someone or something that acts out of control. For instance: unvetted dependencies and packages maintained by other people. Do you have time to vet every version of package composer loads into your environment? Maybe the ones you choose directly. What about the transitive ones they need to function? Every single time you need an update?
This is not at all far-fetched. This is a problem that plagues every single dependency management system. Oversight is cost-prohibitive.
Not at all. This happens all the time in front-end engineering and frankly I’m amazed it isn’t a huge problem in PHP. PHP simply allows anyone to change the implementation of any function. Overloading operators is done by treating them as functions, and allowing their implementation to be changed. But PHP doesn’t guard its globals: everything is up for grabs. As a result, security-minded engineers stop using package managers like composer, because they can’t spend time to vet every single downloaded script.
Because that would require I set up a Sonar server. I lack the know-how and the funds. Gotta work with what I’ve got. So I use things like PHPStan instead.
Elaborate? Generics in Java for instance are implemented very badly: data types get erased altogether during compilation, and at runtime the engine couldn’t care less about them. If PHP is going to go that route, I’ll give conservative stubborn naysayers all the room.
Right now my longest single PHP module counts 800 lines. Shortly, some of those lines will be moved to a database table. I may want to split off some things as this module is a catch-all for anything database related.
TL;DR: don’t believe everything you read in the media. A lot of people use outrageous statements not because they’re true or false, but because it sells.
Agreed. Any ecosystem that lets its entire execution context be blown away by some imported nonsense shouldn’t ever have become as popular as JavaScript.
Typical result of authors and editors adapting their input to observed output, only to have the output system change without notifying anyone or looking for conflicts with existing input.
OK. That should work, although I have seen people complain a foreach loop will fail on Windows. Try a counting loop, or, since $items is a list of DOMElements, access $item's child nodes directly.
Oof. I've done that. At least it beats JSP...
If we had a compile-time checker and we could precompilations to our web sites, I’d be in favor. I love type checks at compile time.
If operator overload doesn’t happen by making operators into functions, PHP might have a chance to not be completely and utterly messed up by anyone, for any reason.
Rogue: someone or something that acts out of control. For instance: unvetted dependencies and packages maintained by other people. Do you have time to vet every version of package composer loads into your environment? Maybe the ones you choose directly. What about the transitive ones they need to function? Every single time you need an update?
This is not at all far-fetched. This is a problem that plagues every single dependency management system. Oversight is cost-prohibitive.
Not at all. This happens all the time in front-end engineering and frankly I’m amazed it isn’t a huge problem in PHP. PHP simply allows anyone to change the implementation of any function. Overloading operators is done by treating them as functions, and allowing their implementation to be changed. But PHP doesn’t guard its globals: everything is up for grabs. As a result, security-minded engineers stop using package managers like composer, because they can’t spend time to vet every single downloaded script.
Any built-in function can be replaced at global scope. Goodbye, trust! Did your unit tests catch that?
Ack. No please don’t allow operator overloading when any rogue script can replace the functionality of standard operations at global scope.
Agreed. Can you imagine, some rogue script overloading the . operator in global scope?
Because that would require I set up a Sonar server. I lack the know-how and the funds. Gotta work with what I’ve got. So I use things like PHPStan instead.
The $ symbol does make it really obvious that something is a variable. Powershell uses that too. But should you forget the symbol once…
What IDE?
The fact that _SERVER headers can be and are overwritten by anyone crafting a malicious request. Oh, you had _ENV vars? No, you didn’t.
No.
No.
Elaborate? Generics in Java for instance are implemented very badly: data types get erased altogether during compilation, and at runtime the engine couldn’t care less about them. If PHP is going to go that route, I’ll give conservative stubborn naysayers all the room.
Right now my longest single PHP module counts 800 lines. Shortly, some of those lines will be moved to a database table. I may want to split off some things as this module is a catch-all for anything database related.
TL;DR: don’t believe everything you read in the media. A lot of people use outrageous statements not because they’re true or false, but because it sells.
HTMX?
Agreed. Any ecosystem that lets its entire execution context be blown away by some imported nonsense shouldn’t ever have become as popular as JavaScript.
Brainfuck was created to be awful on purpose, so it deserves a special place.
It does strike me as odd that the sqft price is the same as the whole property price.
Typical result of authors and editors adapting their input to observed output, only to have the output system change without notifying anyone or looking for conflicts with existing input.
Think of an associative array as dictionary: the key is a unique word, that leads to a single value.
Think of a multidimensional array as a spreadsheet or a chess board: each row has multiple columns.
What's unhappy about that? It seems perfectly capable of displaying a lawn.
OK. That should work, although I have seen people complain a foreach loop will fail on Windows. Try a counting loop, or, since $items is a list of DOMElements, access $item's child nodes directly.
How are you populating $item?