[wp-hackers] PHP Coding Practices

Andy Skelton skeltoac at gmail.com
Wed Feb 15 00:46:44 GMT 2006


On 2/14/06, Mark Jaquith <mark.wordpress at txfx.net> wrote:
> I'd like to get some group feedback on this:
>
> Issue #1

Worthwhile to use strpos !== false in all new and updated code (I
recently started doing that, too) but I wouldn't sweat the old stuff
unless you're really bored.

> Issue #2
> foreach ( (array) $things as $thing ) {

That's awesome except you can also foreach an object. Be careful about that.

Andy


More information about the wp-hackers mailing list