It does not work in php-classes when using type-hinting wich was introduced with php 7: public function xyz(): bool { ... }