>> Here's an actual snippet from my production code (which interfaces with 
>> ElasticSearch):
>> http://paste.roguecoders.com/p/0747f2363c228a09e0ddd6f8ec52f2e8.html
>>
>> If you consider this readable, you're fare more literate than I will ever be 
>> (-:
>
> Using JSON syntax would only "maybe" make it more readable, and then
> only because you would probably not format it on so many lines ;-)

For gits and shiggles I converted it to short array syntax. I
structure my arrays much like Sean does and I was of the opinion that
a shorter syntax would not improve the readability much. I have to
admit I do like the way the short syntax with the : separator looks,
though the => separator is not bad on the eyes either.

Converted snippets:
Using => separator:
http://paste.roguecoders.com/p/8c653602dee96b87f566a29b78aa4daa.html
Using : (JSON) separator:
http://paste.roguecoders.com/p/b117894e85b6f980b8390bc2828ca227.html

-- 
Herman Radtke
hermanrad...@gmail.com | http://hermanradtke.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to