Doc->Bug #79988 [Opn->Ver]: new reserved keyword `match` is a backward incompatible change
| From: | cmb@php.net | Date: | Tue, 18 Aug 2020 10:39:52 +0000 |
| Subject: | Doc->Bug #79988 [Opn->Ver]: new reserved keyword `match` is a backward incompatible change | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17794@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79988&edit=1
ID: 79988
Updated by: cmb@php.net
Reported by: call dot user dot func at gmail dot com
Summary: new reserved keyword
match is a backward
incompatible change
-Status: Open
+Status: Verified
-Type: Documentation Problem
+Type: Bug
Package: Documentation problem
PHP Version: 8.0.0beta1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2020-08-18 09:07:15] call dot user dot func at gmail dot com
Title fix
------------------------------------------------------------------------
[2020-08-18 09:05:29] call dot user dot func at gmail dot com
Description:
------------
I am testing php8 on my project. One project have Match as a class name. In PHP8 this
is now a syntax error. See: https://3v4l.org/ZTsft
It should be really dcoumented in https://github.com/php/php-src/blob/php-8.0.0beta1/UPGRADING
-> 1. Backward Incompatible Changes
instead of hidden in 2. New Features -> Added support for match expression. RFC: https://wiki.php.net/rfc/match_expression_v2
This could be a real frustrating one in some projects. As in my case, the class name is database
related and i can't change it easily.
Test script:
---------------
class Match{
static function foo(){}
}
Match::foo();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79988&edit=1