summaryrefslogtreecommitdiff
path: root/tests/classes/type_hinting_002.phpt
blob: a491a26a628b1b530de70a00b91503b2c3653f0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
ZE2 class type hinting non existing class
--FILE--
<?php

class Foo {
    function a(NonExisting $foo) {}
}

$o = new Foo;
$o->a($o);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Foo::a() expects argument #1 ($foo) to be of type NonExisting, Foo given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): Foo->a(Object(Foo))
#1 {main}
  thrown in %s on line %d