From 2e9b959473a3207bd23a36b3491735e828f54316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 28 Mar 2026 22:56:49 +0100 Subject: [PATCH] Correctly format predefined constant pages --- appendices/reserved.constants.core.xml | 4 +- appendices/tokens.xml | 798 +++++++++++++++++++------ reference/dir/constants.xml | 11 +- reference/iconv/constants.xml | 22 +- reference/mysqli/constants.xml | 6 +- reference/openssl/constants.xml | 4 +- 6 files changed, 647 insertions(+), 198 deletions(-) diff --git a/appendices/reserved.constants.core.xml b/appendices/reserved.constants.core.xml index fd3066c5ebdd..b70058ad619c 100644 --- a/appendices/reserved.constants.core.xml +++ b/appendices/reserved.constants.core.xml @@ -649,7 +649,7 @@ A Windows - + CTRL C @@ -666,7 +666,7 @@ A Windows - + CTRL BREAK diff --git a/appendices/tokens.xml b/appendices/tokens.xml index 4294cbc1e38b..3f85262a54ff 100644 --- a/appendices/tokens.xml +++ b/appendices/tokens.xml @@ -1,6 +1,5 @@ - List of Parser Tokens @@ -52,124 +51,189 @@ defined('T_FN') || define('T_FN', 10001); - T_ABSTRACT + + T_ABSTRACT + (int) + abstract - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + + T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + (int) + & (available as of PHP 8.1.0) - T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG + + T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG + (int) + & (available as of PHP 8.1.0) - T_AND_EQUAL + + T_AND_EQUAL + (int) + &= assignment operators - T_ARRAY + + T_ARRAY + (int) + array() - array, array syntax + array, array syntax - T_ARRAY_CAST + + T_ARRAY_CAST + (int) + (array) type-casting - T_AS + + T_AS + (int) + as &foreach; - T_ATTRIBUTE + + T_ATTRIBUTE + (int) + #[ attributes (available as of PHP 8.0.0) - T_BAD_CHARACTER - + + T_BAD_CHARACTER + (int) + + anything below ASCII 32 except \t (0x09), \n (0x0a) and \r (0x0d) (available as of PHP 7.4.0) - T_BOOLEAN_AND + + T_BOOLEAN_AND + (int) + && logical operators - T_BOOLEAN_OR + + T_BOOLEAN_OR + (int) + || logical operators - T_BOOL_CAST + + T_BOOL_CAST + (int) + (bool) or (boolean) type-casting - T_BREAK + + T_BREAK + (int) + break break - T_CALLABLE + + T_CALLABLE + (int) + callable callable - T_CASE + + T_CASE + (int) + case switch - T_CATCH + + T_CATCH + (int) + catch - T_CLASS + + T_CLASS + (int) + class classes and objects - T_CLASS_C + + T_CLASS_C + (int) + __CLASS__ magic constants - T_CLONE + + T_CLONE + (int) + clone classes and objects - T_CLOSE_TAG + + T_CLOSE_TAG + (int) + ?> or %> escaping from HTML - T_COALESCE + + T_COALESCE + (int) + ?? comparison operators - T_COALESCE_EQUAL + + T_COALESCE_EQUAL + (int) + ??= assignment operators @@ -177,33 +241,51 @@ defined('T_FN') || define('T_FN', 10001); - T_COMMENT + + T_COMMENT + (int) + // or #, and /* */ comments - T_CONCAT_EQUAL + + T_CONCAT_EQUAL + (int) + .= assignment operators - T_CONST + + T_CONST + (int) + const class constants - T_CONSTANT_ENCAPSED_STRING + + T_CONSTANT_ENCAPSED_STRING + (int) + "foo" or 'bar' string syntax - T_CONTINUE + + T_CONTINUE + (int) + continue continue - T_CURLY_OPEN + + T_CURLY_OPEN + (int) + {$ advanced @@ -211,52 +293,78 @@ defined('T_FN') || define('T_FN', 10001); - T_DEC + + T_DEC + (int) + -- - incrementing/decrementing + incrementing/decrementing operators - T_DECLARE + + T_DECLARE + (int) + declare declare - T_DEFAULT + + T_DEFAULT + (int) + default switch - T_DIR + + T_DIR + (int) + __DIR__ magic constants - T_DIV_EQUAL + + T_DIV_EQUAL + (int) + /= assignment operators - T_DNUMBER + + T_DNUMBER + (int) + 0.12, etc. floating point numbers - T_DO + + T_DO + (int) + do do..while - T_DOC_COMMENT + + T_DOC_COMMENT + (int) + /** */ PHPDoc style comments - T_DOLLAR_OPEN_CURLY_BRACES + + T_DOLLAR_OPEN_CURLY_BRACES + (int) + ${ basic @@ -264,133 +372,198 @@ defined('T_FN') || define('T_FN', 10001); - T_DOUBLE_ARROW + + T_DOUBLE_ARROW + (int) + => array syntax - T_DOUBLE_CAST + + T_DOUBLE_CAST + (int) + (real), (double) or (float) type-casting - T_DOUBLE_COLON + + T_DOUBLE_COLON + (int) + :: see T_PAAMAYIM_NEKUDOTAYIM below - T_ECHO + + T_ECHO + (int) + echo echo - T_ELLIPSIS + + T_ELLIPSIS + (int) + ... function arguments - T_ELSE + + T_ELSE + (int) + else else - T_ELSEIF + + T_ELSEIF + (int) + elseif elseif - T_EMPTY + + T_EMPTY + (int) + empty empty - T_ENCAPSED_AND_WHITESPACE + + T_ENCAPSED_AND_WHITESPACE + (int) + " $a" constant part of string with variables - T_ENDDECLARE + + T_ENDDECLARE + (int) + enddeclare - declare, alternative syntax + declare, alternative syntax - T_ENDFOR + + T_ENDFOR + (int) + endfor - for, alternative syntax + for, alternative syntax - T_ENDFOREACH + + T_ENDFOREACH + (int) + endforeach - &foreach;, alternative syntax + &foreach;, alternative syntax - T_ENDIF + + T_ENDIF + (int) + endif - if, alternative syntax + if, alternative syntax - T_ENDSWITCH + + T_ENDSWITCH + (int) + endswitch - switch, alternative syntax + switch, alternative syntax - T_ENDWHILE + + T_ENDWHILE + (int) + endwhile - while, alternative syntax + while, alternative syntax - T_ENUM + + T_ENUM + (int) + enum Enumerations (available as of PHP 8.1.0) - T_END_HEREDOC - + + T_END_HEREDOC + (int) + + heredoc syntax - T_EVAL + + T_EVAL + (int) + eval() eval - T_EXIT + + T_EXIT + (int) + exit or die exit, die - T_EXTENDS + + T_EXTENDS + (int) + extends - extends, classes and objects + extends, classes and objects - T_FILE + + T_FILE + (int) + __FILE__ magic constants - T_FINAL + + T_FINAL + (int) + final - T_FINALLY + + T_FINALLY + (int) + finally - T_FN + + T_FN + (int) + fn arrow functions @@ -398,425 +571,643 @@ defined('T_FN') || define('T_FN', 10001); - T_FOR + + T_FOR + (int) + for for - T_FOREACH + + T_FOREACH + (int) + foreach &foreach; - T_FUNCTION + + T_FUNCTION + (int) + function functions - T_FUNC_C + + T_FUNC_C + (int) + __FUNCTION__ magic constants - T_GLOBAL + + T_GLOBAL + (int) + global variable scope - T_GOTO + + T_GOTO + (int) + goto goto - T_HALT_COMPILER + + T_HALT_COMPILER + (int) + __halt_compiler() - T_IF + + T_IF + (int) + if if - T_IMPLEMENTS + + T_IMPLEMENTS + (int) + implements - T_INC + + T_INC + (int) + ++ - incrementing/decrementing + incrementing/decrementing operators - T_INCLUDE + + T_INCLUDE + (int) + include include - T_INCLUDE_ONCE + + T_INCLUDE_ONCE + (int) + include_once include_once - T_INLINE_HTML - + + T_INLINE_HTML + (int) + + text outside PHP - T_INSTANCEOF + + T_INSTANCEOF + (int) + instanceof type operators - T_INSTEADOF + + T_INSTEADOF + (int) + insteadof - T_INTERFACE + + T_INTERFACE + (int) + interface - T_INT_CAST + + T_INT_CAST + (int) + (int) or (integer) type-casting - T_ISSET + + T_ISSET + (int) + isset() isset - T_IS_EQUAL + + T_IS_EQUAL + (int) + == comparison operators - T_IS_GREATER_OR_EQUAL + + T_IS_GREATER_OR_EQUAL + (int) + >= comparison operators - T_IS_IDENTICAL + + T_IS_IDENTICAL + (int) + === comparison operators - T_IS_NOT_EQUAL + + T_IS_NOT_EQUAL + (int) + != or <> comparison operators - T_IS_NOT_IDENTICAL + + T_IS_NOT_IDENTICAL + (int) + !== comparison operators - T_IS_SMALLER_OR_EQUAL + + T_IS_SMALLER_OR_EQUAL + (int) + <= comparison operators - T_LINE + + T_LINE + (int) + __LINE__ magic constants - T_LIST + + T_LIST + (int) + list() list - T_LNUMBER + + T_LNUMBER + (int) + 123, 012, 0x1ac, etc. integers - T_LOGICAL_AND + + T_LOGICAL_AND + (int) + and logical operators - T_LOGICAL_OR + + T_LOGICAL_OR + (int) + or logical operators - T_LOGICAL_XOR + + T_LOGICAL_XOR + (int) + xor logical operators - T_MATCH + + T_MATCH + (int) + match &match; (available as of PHP 8.0.0) - T_METHOD_C + + T_METHOD_C + (int) + __METHOD__ magic constants - T_MINUS_EQUAL + + T_MINUS_EQUAL + (int) + -= assignment operators - T_MOD_EQUAL + + T_MOD_EQUAL + (int) + %= assignment operators - T_MUL_EQUAL + + T_MUL_EQUAL + (int) + *= assignment operators - T_NAMESPACE + + T_NAMESPACE + (int) + namespace namespaces - T_NAME_FULLY_QUALIFIED + + T_NAME_FULLY_QUALIFIED + (int) + \App\Namespace namespaces (available as of PHP 8.0.0) - T_NAME_QUALIFIED + + T_NAME_QUALIFIED + (int) + App\Namespace namespaces (available as of PHP 8.0.0) - T_NAME_RELATIVE + + T_NAME_RELATIVE + (int) + namespace\Namespace namespaces (available as of PHP 8.0.0) - T_NEW + + T_NEW + (int) + new classes and objects - T_NS_C + + T_NS_C + (int) + __NAMESPACE__ namespaces - T_NS_SEPARATOR + + T_NS_SEPARATOR + (int) + \ namespaces - T_NUM_STRING + + T_NUM_STRING + (int) + "$a[0]" numeric array index inside string - T_OBJECT_CAST + + T_OBJECT_CAST + (int) + (object) type-casting - T_OBJECT_OPERATOR + + T_OBJECT_OPERATOR + (int) + -> classes and objects - T_NULLSAFE_OBJECT_OPERATOR + + T_NULLSAFE_OBJECT_OPERATOR + (int) + ?-> classes and objects - T_OPEN_TAG + + T_OPEN_TAG + (int) + <?php, <? or <% escaping from HTML - T_OPEN_TAG_WITH_ECHO + + T_OPEN_TAG_WITH_ECHO + (int) + <?= or <%= escaping from HTML - T_OR_EQUAL + + T_OR_EQUAL + (int) + |= assignment operators - T_PAAMAYIM_NEKUDOTAYIM + + T_PAAMAYIM_NEKUDOTAYIM + (int) + :: scope resolution. Also defined as T_DOUBLE_COLON. - T_PLUS_EQUAL + + T_PLUS_EQUAL + (int) + += assignment operators - T_POW + + T_POW + (int) + ** arithmetic operators - T_POW_EQUAL + + T_POW_EQUAL + (int) + **= assignment operators - T_PRINT + + T_PRINT + (int) + print print - T_PRIVATE + + T_PRIVATE + (int) + private classes and objects - T_PRIVATE_SET + + T_PRIVATE_SET + (int) + private(set) property hooks (available as of PHP 8.4.0) - T_PROPERTY_C + + T_PROPERTY_C + (int) + __PROPERTY__ magic constants - T_PROTECTED + + T_PROTECTED + (int) + protected classes and objects - T_PROTECTED_SET + + T_PROTECTED_SET + (int) + protected(set) property hooks (available as of PHP 8.4.0) - T_PUBLIC + + T_PUBLIC + (int) + public classes and objects - T_PUBLIC_SET + + T_PUBLIC_SET + (int) + public(set) property hooks (available as of PHP 8.4.0) - T_READONLY + + T_READONLY + (int) + readonly classes and objects (available as of PHP 8.1.0) - T_REQUIRE + + T_REQUIRE + (int) + require require - T_REQUIRE_ONCE + + T_REQUIRE_ONCE + (int) + require_once require_once - T_RETURN + + T_RETURN + (int) + return returning values - T_SL + + T_SL + (int) + << bitwise operators - T_SL_EQUAL + + T_SL_EQUAL + (int) + <<= assignment operators - T_SPACESHIP + + T_SPACESHIP + (int) + <=> comparison operators - T_SR + + T_SR + (int) + >> bitwise operators - T_SR_EQUAL + + T_SR_EQUAL + (int) + >>= assignment operators - T_START_HEREDOC + + T_START_HEREDOC + (int) + <<< heredoc syntax - T_STATIC + + T_STATIC + (int) + static variable scope - T_STRING + + T_STRING + (int) + parent, self, etc. identifiers, e.g. keywords like parent and self, @@ -825,12 +1216,18 @@ defined('T_FN') || define('T_FN', 10001); - T_STRING_CAST + + T_STRING_CAST + (int) + (string) type-casting - T_STRING_VARNAME + + T_STRING_VARNAME + (int) + "${a variable variables @@ -838,79 +1235,123 @@ defined('T_FN') || define('T_FN', 10001); - T_SWITCH + + T_SWITCH + (int) + switch switch - T_THROW + + T_THROW + (int) + throw - T_TRAIT + + T_TRAIT + (int) + trait - T_TRAIT_C + + T_TRAIT_C + (int) + __TRAIT__ __TRAIT__ - T_TRY + + T_TRY + (int) + try - T_UNSET + + T_UNSET + (int) + unset() unset - T_UNSET_CAST + + T_UNSET_CAST + (int) + (unset) type-casting - T_USE + + T_USE + (int) + use namespaces - T_VAR + + T_VAR + (int) + var classes and objects - T_VARIABLE + + T_VARIABLE + (int) + $foo variables - T_WHILE + + T_WHILE + (int) + while - while, do..while + while, do..while - T_WHITESPACE + + T_WHITESPACE + (int) + \t \r\n - + - T_XOR_EQUAL + + T_XOR_EQUAL + (int) + ^= assignment operators - T_YIELD + + T_YIELD + (int) + yield generators - T_YIELD_FROM + + T_YIELD_FROM + (int) + yield from generators @@ -921,7 +1362,6 @@ defined('T_FN') || define('T_FN', 10001); See also token_name. - - diff --git a/reference/mysqli/constants.xml b/reference/mysqli/constants.xml index 7c0a1ae86c63..9392b76db318 100644 --- a/reference/mysqli/constants.xml +++ b/reference/mysqli/constants.xml @@ -144,7 +144,7 @@ MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS - (int) + (int) @@ -157,7 +157,7 @@ MYSQLI_CLIENT_FOUND_ROWS - (int) + (int) @@ -168,7 +168,7 @@ MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT - (int) + (int) diff --git a/reference/openssl/constants.xml b/reference/openssl/constants.xml index b81e52ee1309..293be48f5cd9 100644 --- a/reference/openssl/constants.xml +++ b/reference/openssl/constants.xml @@ -163,8 +163,8 @@ - OPENSSL_KEYTYPE_DH - (int) + OPENSSL_KEYTYPE_DH + (int)