Here is my code:
function phpwtf(string $s) {
echo \"$s\\n\";
}
phpwtf(\"Type hinting is da bomb\");
Which results in this error:
PHP allows "hinting" where you supply a class to specify an object. According to the PHP manual, "Type Hints can only be of the object and array (since PHP 5.1) type. Traditional type hinting with int and string isn't supported." The error is confusing because of your choice of "string" - put "myClass" in its place and the error will read differently: "Argument 1 passed to phpwtf() must be an instance of myClass, string given"