Until every web site and bank requires you to use it because their CTO saw an ad in an airport that said it was a good idea and makes line go up.
"Leadership" today is monkey-see, monkey-do.
See also: Sign in with Google on every web site, even if you don't have a Google account; and Cloudflare interrupting your web surfing every six minutes to make sure you haven't be absorbed by the Borg.
If the closure doesn't use $this (an instance of the current class) then it doesn't need to store a reference to it, which also skips the bookkeeping from the garbage collector.
In PHP, closures defined inside a class method automatically capture `$this`, which means the closure holds a reference to the entire object even if it never uses it. This prevents the object from being garbage collected and adds overhead. The optimization detects when `$this` isn't actually used and makes the closure static automatically, dropping that unnecessary reference.
MySQL does not let you have transactional DDL statements (alter, create, index etc).
If you're building anything serious and your data integrity is important, use Postgres.
Postgres is much stricter, and always was. MySQL tried to introduce several strict modes to mitigate the problems that they had, but I would always recommend to use Postgres.
Klankers will fix everything. Right?
reply