match expression must be terminated by a semicolon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux