Description
Why do expressions match with && or || operator behave like the example? What is the reason for returning false?
The following code: https://3v4l.org/KktKB#v8.2.4
<?php
$result = match('test') {
'test' && true => true,
'test2' && true => true,
default => false,
};
var_dump($result);
Resulted in this output:
But I expected this output instead:
PHP Version
8.2
Operating System
No response
Description
Why do expressions
matchwith&&or||operator behave like the example? What is the reason for returningfalse?The following code: https://3v4l.org/KktKB#v8.2.4
Resulted in this output:
But I expected this output instead:
PHP Version
8.2
Operating System
No response