Comments By: Zelborg
-
Good article - as an experienced PHP coder not everything was either new or useful to me, but that's not to say the article won't be useful to many other people and the more people attempt to give back to the community the more there is to be had - so thanks. On the static variable usage (which, personally, I find extremely useful!) the original assignment (where $var === null) can be put in the static declaration, such that: function increment() { static $count = 0; return ++$count; } Just cleans up the code a bit - I don't know of any technical or logical reasons why this is different from your other method? Cheers!posted on Aug 19, 2007 at 1:22pm | context