Created
March 16, 2023 23:05
-
-
Save lstrojny/6847341f7491852d95779168136605a0 to your computer and use it in GitHub Desktop.
Single return expression only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$v = match ($pop) { | |
default => [++$pops[$pop], $marker][1], | |
null => match ($pops[$marker]) { | |
0 => '', | |
default => [--$pops[$marker], $marker][1], | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment