I\'ve been working on code that\'s intended to be used with objects, without really caring what the kind of object is. I wanted to type hint that the method being written ex
As of php 7.2 this feature has now been implemented. you can type hint for any object now.
function myFunc(Object $myObject) : Object { return $myObject; }
You can review this in the official documentation