Bug #79988 [Ver->Csd]: new reserved keyword `match` is a backward incompatible change

From: Date: Tue, 18 Aug 2020 10:40:04 +0000
Subject: Bug #79988 [Ver->Csd]: new reserved keyword `match` is a backward incompatible change
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17795@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:             Verified
+Status:             Closed
 Type:               Bug
 Package:            Documentation problem
 PHP Version:        8.0.0beta1
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4514afc1875bedf4dc07cb457f8ef5c986a7ca55
Log: Fix #79988: new reserved keyword match is a backward incompatible change


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


Thread (4 messages)

« previous php.doc.bugs (#17795) next »