Community
Participate
Working Groups
I developed a good habit where string delimiters are put at the beginning of a line rather than after. $sql = "SELECT column1, column2, column3" . " FROM tablename" . " WHERE id = ?" ; The reason I like having delimiters on the beginning of the line is it makes it very clear that the "next" line is there as a continuation of the previous line. It also makes adding a new line or taking an existing line away very simple. The same would potentially apply with comma delimiters: $columns = array( "column1" , "column2" , "column3" ) ; The same can be true with math operations, logic operations, and others like it: $total = $baseRate - $discount + $localTaxes + $countyTaxes + $stateTaxes + $shippingCharge + $handlingCharge ;
Bug 452255 is similar to this bug but not as generic.