Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4: Single underscore as class name is deprecated #4099

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions language/oop5/basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
</para>
<para>
The class name can be any valid label, provided it is not a
PHP <link linkend="reserved">reserved word</link>. A valid class
name starts with a letter or underscore, followed by any number of
letters, numbers, or underscores. As a regular expression, it
would be expressed thus:
PHP <link linkend="reserved">reserved word</link>.
As of PHP 8.4.0, using a single underscore <literal>_</literal> as a
class name is deprecated.
A valid class name starts with a letter or underscore,
followed by any number of letters, numbers, or underscores.
As a regular expression, it would be expressed thus:
<code>^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$</code>.
</para>
<para>
Expand Down