slides/internals/php84-asymmetric-visibility-2.xml
PHP 8.4: Asymmetric Visibility
3/25
PHP 8.4: Asymmetric Visibility
PHP 8.4: Property Hooks
  • • Only works on typed properties
  • • set visibility must be equal or lesser than main (get) visbility
  • • Using $obj->array[] follows set visibility
  • • Inherited properties must have the same time, and might have a wider visibility
  • • private(set) also implies final
  • • readonly (without private(set)) is analogous to protected(set) (+ write once semantics)