match Is Now A Keyword

Match() was introduced in PHP 8.0 as a new command. As a side effect, it is now a PHP keyword, and it is not possible to create classes, functions or constants with that name.

PHP code

<?php

function match() {
     echo __FUNCTION__;
}

match();

?>

Before

match

After

PHP Parse error:  syntax error, unexpected token "match", expecting "("

Parse error: syntax error, unexpected token "match", expecting "("

PHP version change

This behavior changed in 8.0

Error Messages