|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-08-18 10:02 UTC] call dot user dot func at gmail dot com
Description: ------------ Stated in this RFC: https://wiki.php.net/rfc/match_expression_v2#backward_incompatible_changes we have this new keyword `match` which now result in syntax errors when used as a namespaces, class names, function names, global constants. Well, this behaviour is not consistant with the RFC and also inconsistent between the alpha3 and all other pre-release versions of php8. My tests are in the attached test scripts. Greetz Roland Test script: --------------- <?php define("match", 1); // no error in php8.0.0beta1 class Match{} // error in php8.0.0beta1 function match(){} // error in php8.0.0beta1 namespace match{} // only error in php8.0.0alpha3 namespace Foo\Bar\Match; // only error in php8.0.0alpha3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 00:00:02 2025 UTC |
Ok i understand this new RFC. When you say it is implemented in beta1, why it does not throw a error in this version when using namespace match{}? Also what's with all the other cases i've mentioned? Really not a bug?