1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/Zend/tests/match/023.phpt
T
2020-07-11 16:50:51 +02:00

22 lines
310 B
PHP

--TEST--
Test match strict comparison with true expression
--FILE--
<?php
function wrong() {
throw new Exception();
}
echo match (true) {
'truthy' => wrong(),
['truthy'] => wrong(),
new stdClass() => wrong(),
1 => wrong(),
1.0 => wrong(),
true => "true\n",
};
?>
--EXPECT--
true