<?php final class FromVariable { public static function run($filter, bool $variable = true, bool $variable2 = false) { $result = match (true) { $variable => 'a', $variable2 => 'b', default => throw new \InvalidArgumentException(), }; var_dump($result); } } FromVariable::run(false, true, false);
You have javascript disabled. You will not be able to edit any code.