Hi guys, have a bit of a problem here. Hope someone can help me out:
Class Test
{
public function __construct()
{
}
public static function Apple(int $a)
{
return 0;
}
}
///////////////////////////////////////
Test::Apple(1);
And its giving me the following error: “Argument 1 passed to Test::Apple() must be an instance of int, integer given, called in…”
I tried casting it to an integer without luck. After some searching, I think it seems that PHP does not support type-hinting for the standard data types (int, doubles), but does support type-hinting of objects (phew!).