in reply to Simplifying code (Not obfuscation)
First thing: Don't put double-quotes around $var in your print. What you have written takes the string value of $var, and then prints that. It would have exactly the same effect to simply print $var (IE no quotes). (If that were a return instead of a print, there would be differences, in that if $var had some meaning beyond it's stringification (was an object, for an example), it would destroy that value.) Using quotes will actualy slow your code down, and make it not do the right thing, in almost all cases. (Well, in almost all cases where the only thing in the doublequotes is a single variable.)
I was going to write more here, but doubtless others will. I need to get going.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Simplifying code (Not obfuscation)
by 2mths (Beadle) on Mar 04, 2003 at 11:24 UTC |