Re: [Discussion] is_string(), string type and objects implementing __toString()

From: Date: Thu, 09 Mar 2017 09:33:49 +0000
Subject: Re: [Discussion] is_string(), string type and objects implementing __toString()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-98452@lists.php.net to get a copy of this message
On 08/03/17 15:13, Larry Garfield wrote: > (I suppose there's a debate to be had if an int is stringable in strict > mode; I'm not sure there myself.) I think the main difference between strict and what I will call normal mode is that in the strict world of a compiler you have to call code to provide a string of characters from a binary variable such as an integer, while PHP was originally designed simply to provide the string view when that is needed. Conventional user input is typed as strings, and needs to be displayed as strings on the way back out how ever you restrict the filtering of that data internally. Strict may provide some users with a comfort blanket that internally they have to do fewer checks on the data coming in but it is only creating an uncontrollable mess instead since there are now even more ways to filter what is essentially the same simple data. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

« previous php.internals (#98452) next »