PHP Declaring Multiple Variables

Like this blog? Consider exploring one of our sponsored banner ads...

This one is for all of you out there that think code is beautiful. This is a nice way to declare multiple variables to the same value with one clean line. I use this often when coding for E_STRICT so that I do not get a “Notice” for uninitialized variables.

$var1 = $var2 = $var3 = 0;

About this entry