From 0b7c382cb757b7a3e6c835d5d11d5eb5d0cddb8c Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 27 Nov 2024 14:53:33 +0100 Subject: [PATCH] Mention `final` modifier for methods coming from traits --- language/oop5/traits.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 30b020289482..9d844b565a6b 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -545,6 +545,36 @@ class ConstantsExample { + + Final methods + + As of PHP 8.3.0, the final + modifier can be applied to methods coming from traits. + + + Defining a method coming from a trait as <literal>final</literal> + + +]]> + + + +