
PHP type hints: self and parent
In PHP we can type hint function arguments since version 5.0. Over the years and with newer versions of PHP the number of possible type hints have increased. Here’s an overview: public function foo( // Since 5.0 self $self, parent $parent, FooInterface $foo, // Since 5.1 array $array,...