Reply to Error messages

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация