1--TEST--
2Adding a class method object type hint
3--FILE--
4<?php
5
6class One {
7    public function a(object $obj) {}
8}
9
10$one = new One();
11$one->a(new One());
12$one->a(123);
13?>
14--EXPECTF--
15Fatal error: Uncaught TypeError: One::a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d
16Stack trace:
17#0 %s(9): One->a(123)
18#1 {main}
19  thrown in %s on line 4
20