1--TEST--
2No coercion should be applied to type true
3--FILE--
4<?php
5
6function test(true $v) { var_dump($v); }
7
8try {
9    test(1);
10} catch (\TypeError $e) {
11    echo $e->getMessage(), \PHP_EOL;
12}
13try {
14    test('1');
15} catch (\TypeError $e) {
16    echo $e->getMessage(), \PHP_EOL;
17}
18try {
19    test([1]);
20} catch (\TypeError $e) {
21    echo $e->getMessage(), \PHP_EOL;
22}
23try {
24    test(new stdClass());
25} catch (\TypeError $e) {
26    echo $e->getMessage(), \PHP_EOL;
27}
28
29?>
30--EXPECTF--
31test(): Argument #1 ($v) must be of type true, int given, called in %s on line %d
32test(): Argument #1 ($v) must be of type true, string given, called in %s on line %d
33test(): Argument #1 ($v) must be of type true, array given, called in %s on line %d
34test(): Argument #1 ($v) must be of type true, stdClass given, called in %s on line %d
35