Re: type hinting

From: Date: Fri, 04 Jan 2008 20:19:12 +0000
Subject: Re: type hinting
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-34491@lists.php.net to get a copy of this message
On Fri, 2008-01-04 at 20:51 +0100, Pierre wrote: > On Jan 4, 2008 8:20 PM, Stanislav Malyshev <stas@zend.com> wrote: > > > Ok but if someone inputs an array in the query string i have a problem > > > > Which problem? OK, you'd have string "Array" instead once you handle it. > > If it's a problem, then having "Array" from the start is a problem too. > > > > > with that. And I said standardized way, ie bool true outputs as "1", > > > float 5.20 outputs as "5.2". For objects, toString is a standardized > > > output but serialization is not, and for arrays no standardized output > > > exists. By standardized I mean a visual representation of the object. A serialized object will look to a web site visitor like complete garbage. > > > > Object serialization is very standardized, it has proper handlers, etc. > > As for outputting arrays, indeed, 'Array' is not very meaningful, but > > would "Incompatible type is call in function foo() /foo/bar.php line > > 123" be better? > > Are you recomanding to use E_NOTICE and higher level with display_errors on? =) > > </runninginciricle> >

« previous php.internals (#34491) next »