On Thu, 2007-07-12 at 09:58 +0100, Stut wrote: > Richard Lynch wrote: > > On Wed, July 11, 2007 4:16 pm, Robert Cummings wrote: > >>> But I'd have to say that the intent is not all that clear, really, > >>> and > >>> I'd be leery of this feature, personally. > >> I wouldn't be leery at all. It's been around for a very long time and > >> it's documented: > >> > >> > >> http://www.php.net/manual/en/language.types.array.php#language.types.array.casting > > > > As soon as I hit send I knew that would be mis-interpreted... > > > > Leery is the wrong word. > > > > Sorry. > > > > It just seems a bit to clever to me... > > > > I suspect I'd skim this code a hundred times and not realize what it > > was doing. > > > > But maybe that's just me. :-) > > I would have to agree. I'm a big fan of self-documenting code, and this > one requires a little bit more knowledge of the intricacies of PHP than > I would expect from your 'average' developer. Hmmm, I thought using an explicit cast was very self explanatory -- especially when the name of the cast is "array". Maybe I'm alone in that thought. I mean if you convert a scalar to an array what do you expect to get? An array with the scalar. *shrug* I can't see how it would be anything else. Cheers, Rob. -- ........................................................... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ........................................................... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php