最佳答案
I'd like to know whether one can type-hint a method to expect primitive types?
Something like this:
public function someMethod(string $str)
//^^^^^^
Or:
private function anotherMethod(int $num)
//^^^
the same way you would:
private function otherMethod(Person $rambo)
//^^^^^^
Is that possible in php?