1--TEST--
2Warnings for confusable types
3--FILE--
4<?php
5
6namespace {
7    function test1(integer $x) {}
8    function test2(double $x) {}
9    function test3(boolean $x) {}
10    function test4(resource $x) {}
11}
12
13namespace Foo {
14    use integer as foo;
15
16    function test5(\integer $x) {}
17    function test6(namespace\integer $x) {}
18    function test7(foo $x) {}
19    function test8(boolean $x) {}
20}
21
22namespace Foo {
23    use integer;
24    function test9(integer $x) {}
25}
26
27namespace {
28    use integer as foo;
29
30    function test10(\integer $x) {}
31    function test11(namespace\integer $x) {}
32    function test12(foo $x) {}
33    function test13(boolean $x) {}
34}
35
36?>
37--EXPECTF--
38Warning: "integer" will be interpreted as a class name. Did you mean "int"? Write "\integer" to suppress this warning in %s on line %d
39
40Warning: "double" will be interpreted as a class name. Did you mean "float"? Write "\double" to suppress this warning in %s on line %d
41
42Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in %s on line %d
43
44Warning: "resource" is not a supported builtin type and will be interpreted as a class name. Write "\resource" to suppress this warning in %s on line %d
45
46Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\Foo\boolean" or import the class with "use" to suppress this warning in %s on line %d
47
48Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in %s on line %d
49