Voting at DZone is super easy, but you aren't logged in. Login and vote now.
By bloid
via alexatnet.com
Published: Nov 05 2007 / 14:47
PHP is a good language, but there are always surprises. And today I've seen an interesting approach in Arnold Daniels's blog. He talks about temporary variables in PHP. This tip is useful to "lazy" developers who do not even think about variable names. They may prefer magic names like ${0} and 0 is good enough variable name, why not...
Comments
FlySwat replied ago:
This should be called:
6 Almost Language Universal tips to Obfuscate your Code.
joorce replied ago:
I suffer for the poor souls coming after him.
Lars Pohlmann replied ago:
That's really bad, although he states:
"When it is better to write more and then read the code easily, do not be lazy.".
I'd say, that's always the case.
Writing less code is about not repeating yourself, not about obfuscating it.
joeabiraad replied ago:
Well I dont see the point of this... Shouldn't your goal be to write BETTER code ?.... down
antych replied ago:
Well, it is a bit doggy but accurate. You can write less code with those tips, whether you should is a different story.
robse replied ago:
Idon'tthinkit'saverygood{0}
c0de replied ago:
Bad practices that makes code unreadable and unmaintainable.
You can write less code by writing code in a smart way by using objects to reuse code.
Voters For This Link (11)
Voters Against This Link (11)