xref: /php-src/Zend/tests/match/023.phpt (revision d5a03708)
1--TEST--
2Test match strict comparison with true expression
3--FILE--
4<?php
5
6function wrong() {
7    throw new Exception();
8}
9
10echo match (true) {
11    'truthy' => wrong(),
12    ['truthy'] => wrong(),
13    new stdClass() => wrong(),
14    1 => wrong(),
15    1.0 => wrong(),
16    true => "true\n",
17};
18
19?>
20--EXPECT--
21true
22