Posted by Fabio on 08/28/07 14:20
"ZeldorBlat" <zeldorblat@gmail.com> ha scritto nel messaggio
news:1188310089.122831.307840@50g2000hsm.googlegroups.com...
> The type hinting is for objects and arrays only. So, with the code
> you've got, PHP expects the argument to be an object of class "string"
> rather than the primitive string.
???
I tryied with
$a = "hi";
foo($a);
but is the same... at this point I don't understand how to remove this kind
or error message.
> Take that out of your function
> declaration and it should be fine.
so I should remove the type for the parameter?
This don't seems a good solution :(
I tryied this kind of error_reporting because else if I declare for my fault
2 time the foo() function, the script is interrupted (cannot be interpreted)
and I got the error message that the function is duplicated.
I was not able to leave the useful "duplicated error message" but removing
the useless *catchable* FATAL (???) error :(
Navigation:
[Reply to this message]
|