jorisvaesen

587 Followers
32 Following
11 Posts

Full stack web developer and data expert working for digital-pharma.be. Builder of covid-vaccinatie.be. PHP dev ❀️

#PHP #Vuejs #Bootstrap #Docker #CakePHP

🐦https://twitter.com/jorisvaesen
πŸ’Όhttps://linkedin.com/in/jorisvaesen
πŸ•‘Europe/Brussels
πŸ“–https://jorisvaesen.be

I found an undocumented change in #php 8.1+ for `ReflectionClass::getDefaultProperties`. There is a note which says: 'This method only works for static properties when used on internal classes. The default value of a static class property can not be tracked when using this method on user defined classes.'
But since php8.1 it seems to track them nonetheless.

Can I rely on this as this is missing in the docs or shouldn't I? (Want to use it for tests)

Example: https://3v4l.org/mM3IT#v8.0.30

scratch_4.php - created on 3v4l.org

View the output of this script on 3v4l.org: the online PHP shell with 250+ PHP versions

@chrastecky
It was introduced in PHP 7.4, but lost some benefits since PHP 8 does some optimizations out of the box without the need of preloading. Although there should still be some performance improvement when done right.
Do you still use preloading scripts on PHP 8? #php
β€œMag Conner Rousseau kinderen hebben met een man? Tom Van Grieken koppelt dit aan de fundamentele vraag of men recht heeft op kinderen, of het recht op een moeder en vader. Door die vragen exclusief te koppelen, doet hij aan cherry picking.”
https://jorisvaesen.be/blog/mag-conner-rousseau-kinderen-hebben-met-een-man?source=fediverse
Enabling opcache just reduced php processing time by ~9x on my blog (reading yaml files).

πŸ” Wachtwoordmanagers

β€˜De verschuiving van het gebruik van zwakke, hergebruikte wachtwoorden naar sterke, unieke wachtwoorden is van vitaal belang voor het beschermen van onze gevoelige informatie en het behouden van onze digitale privacy.’

https://jorisvaesen.be/blog/online-veiligheid-en-privacy-wachtwoordmanagers

Online veiligheid en privacy: Wachtwoordmanagers - jorisvaesen.be

Ontdek de evolutie van wachtwoordbeheer van riskante praktijken tot veilige oplossingen zoals wachtwoordmanagers. Leer waarom ze essentieel zijn voor het beschermen van online identiteiten met unieke, versleutelde wachtwoorden, die gemak en verbeterde beveiliging bieden tegen cyberbedreigingen.

@unshittifier
Seems like a logical explanation. Although, I still find it strange that there are no widely used packages for this problem.

I've put something together using the visitors pattern which could work for me as an OOP developer πŸ™‚

This way its reusable and more readable than endless if-s.

https://github.com/jorisvaesen/ts-error-handling

GitHub - jorisvaesen/ts-error-handling: Trying to overcome the lack of type annotations in catch clauses

Trying to overcome the lack of type annotations in catch clauses - GitHub - jorisvaesen/ts-error-handling: Trying to overcome the lack of type annotations in catch clauses

GitHub

@unshittifier
So a fancy if with type checking and casting basically. At least the type checking is reusable that way.

Aren't there any popular packages who tackle this problem? I'm currently using vue3 but can't seem to find anything broadly used. Guessing every dev builds their own system, which is a shame for such standard behavior.

@unshittifier
Interesting approach. But this is just a fancy if type check, or am I missing something?

@airtwee
But what if you would take different actions based on the exception type?

Like handling an ApiException differently than a TypeError, for example.

I'm really curious if all devs create their own handling system which seems so off to me for something standard as exception handling.