|
Posted by Fabio on 08/28/07 13:46
Hi,
One question.
I set to php.ini this
error_reporting=E_ALL & ~E_NOTICE
to be a list of error messages and some warnings/tips on the code written.
All good, but if I have code like
------------------------
function foo(string $x)
{
echo($x);
}
foo("hi");
------------------------
I got this error
------------------------
Catchable fatal error: Argument 1 passed to foo() must be an instance of
string, string given, called in E:\Work\php\phpFramework\test.php on line 8
and defined in E:\Work\php\phpFramework\test.php on line 3
------------------------
!!!but... is not "hi" a string???
What kind of *Catchable fatal error* would be this???
:)
I write foo(string $x) exactly to say that the function need a string!
Thanks
Navigation:
[Reply to this message]
|