Can type hints be used with abstract classes in PHP, or are they limited to interfaces?

Type hints can be used with abstract classes in PHP. Abstract classes can define abstract methods with type hints just like interfaces. This allows for enforcing type checking on arguments and return values in concrete classes that extend the abstract class.

abstract class AbstractClass {
    abstract public function myMethod(string $param): int;
}

class ConcreteClass extends AbstractClass {
    public function myMethod(string $param): int {
        // implementation
    }
}