Zum Inhalt der Seite gehen


6 New Recent PHP Features (March 2025) !

6 Nuevas Características Recientes de PHP (Marzo 2025) !

🔎Zoom: nubecolectiva.com/comunidad/fl…

#programming #coding #desarrolloweb #devs #softwaredevelopment #php

Als Antwort auf Nube Colectiva

Uh. The property hook slide couldn't be more wrong. It shows, and describes, the ancient magic methods that hooks replace.

Please remove and correct.

Als Antwort auf Larry Garfield

Hi, what exactly do you mean?
If we look at the documentation in Zend (owner of PHP).
We can see that these methods are the ones used in PHP 8.4
zend.com/blog/php-8-4-property…

Can you give me more details please.
I will gladly correct the code.

Dieser Beitrag wurde bearbeitet. (1 Monat her)
Als Antwort auf Nube Colectiva

Those are examples of the old way that hooks replace. The section "What Are Property Hooks?" starts the new stuff.

Or see the documentation on PHP.net. Or the original RFC.

Als Antwort auf Larry Garfield

@Crell I found the RFC about Property Hooks:
wiki.php.net/rfc/property-hook…

In the image I shared, I tried to give a minimal example due to the little space I had.

But if we look at the RFC we use read (get) and write (set) operations.

Could you give me more details so I can make the correction please?

Als Antwort auf Nube Colectiva

I already wrote the PHP docs for them here:

php.net/manual/en/language.oop…

Als Antwort auf Larry Garfield

@Crell @Tylae, Thanks for the clarification, I'm going to make the correction in the image of the property hooks in PHP 8.4.
I'm going to be guided by: php.net/manual/en/language.oop…
And I'll use the basic Hook syntax. The general syntax for declaring a hook is as follows. Example #1 Property Hooks (full version)

Diese Webseite verwendet Cookies. Durch die weitere Benutzung der Webseite stimmst du dieser Verwendung zu. https://inne.city/tos