blob: 7b6a63e8bee6f95c99895c76937dc4ed8b54f9db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--TEST--
Adding a function object type hint
--FILE--
<?php
class A {}
function a(object $obj) {}
a(new A());
a(123);
--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to a() must be an object, integer given, called in %s.php on line 7 and defined in %s:4
Stack trace:
#0 %s(7): a(123)
#1 {main}
thrown in %s on line 4
|