From be767e1bb70d8b43691caa8311786ffa68c281b1 Mon Sep 17 00:00:00 2001 From: Jordi Kroon Date: Fri, 26 Dec 2025 00:26:24 +0100 Subject: [PATCH 1/2] docs: add reserved words restrictions for class-alias in PHP 8.5 Update reserved words documentation to include array and callable as reserved words as of PHP 8.5. Clarify in class_alias() function that aliases cannot use reserved words, with link to reserved words reference. --- appendices/reserved.xml | 6 ++++++ reference/classobj/functions/class-alias.xml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/appendices/reserved.xml b/appendices/reserved.xml index 9c50a7f5fda3..014002ea2dcd 100644 --- a/appendices/reserved.xml +++ b/appendices/reserved.xml @@ -567,6 +567,12 @@ never (as of PHP 8.1) + + array (as of PHP 8.5) + + + callable (as of PHP 8.5) + diff --git a/reference/classobj/functions/class-alias.xml b/reference/classobj/functions/class-alias.xml index a9564e1b885b..fdb350af111e 100644 --- a/reference/classobj/functions/class-alias.xml +++ b/reference/classobj/functions/class-alias.xml @@ -17,6 +17,9 @@ Creates an alias named alias based on the user defined class class. The aliased class is exactly the same as the original class. + + + The class alias cannot be any of the PHP reserved words. From 95c210e0afd141d0e2162be4c74abae4069ceafb Mon Sep 17 00:00:00 2001 From: Jordi Kroon Date: Fri, 6 Mar 2026 23:17:16 +0100 Subject: [PATCH 2/2] migrate para to simpara Co-authored-by: Louis-Arnaud --- reference/classobj/functions/class-alias.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/classobj/functions/class-alias.xml b/reference/classobj/functions/class-alias.xml index fdb350af111e..aeed4ab6d304 100644 --- a/reference/classobj/functions/class-alias.xml +++ b/reference/classobj/functions/class-alias.xml @@ -18,9 +18,9 @@ based on the user defined class class. The aliased class is exactly the same as the original class. - + The class alias cannot be any of the PHP reserved words. - + As of PHP 8.3.0, class_alias also supports