match expression must be terminated by a semicolon

From: Date: Wed, 13 Mar 2024 06:19:40 +0000
Subject: match expression must be terminated by a semicolon
Groups: php.general 
Request: Send a blank email to php-general+get-328386@lists.php.net to get a copy of this message
Hi all, Does anyone have any insight into what Note: A match expression must be terminated by a semicolon ;. means on: https://www.php.net/manual/en/control-structures.match.php Match doesn't seem to need it's own semicolon, ie the following works just fine: php > $foo='bar'; php > echo urlencode(match($foo) {'boo'=>'hoo','bar'=>'bing'}); bing php > $foo='boo'; php > echo urlencode(match($foo) {'boo'=>'hoo','bar'=>'bing'}); hoo

« previous php.general (#328386) next »