Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php match

<?php
$food = 'cake';

$return_value = match ($food) {
    'apple' => 'This food is an apple',
    'bar' => 'This food is a bar',
    'cake' => 'This food is a cake',
};

var_dump($return_value);
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #match
ADD COMMENT
Topic
Name
9+6 =