Which coding style is more common?

Posted by Babiker on Stack Overflow See other posts from Stack Overflow or by Babiker
Published on 2009-05-01T04:42:21Z Indexed on 2010/04/04 5:03 UTC
Read the original article Hit count: 652

Filed under:
|

In no way shape or form am i advertising/promoting my programming style, but as far as 'multiple variable declarations' are concerned, which case is more acceptable professionally and commonly:

case 1:

private $databaseURL   = "localhost"  ;
private $databaseUName = "root"       ;
private $databasePWord = ""           ;
private $databaseName  = "AirAlliance";

case 2:

private $databaseURL = "localhost";
private $databaseUName = "root";
private $databasePWord = "";
private $databaseName = "AirAlliance";

The reason i like case 1 is because i can skim though it and see that all is correct way faster than case 2. Also i can visually get familiar with variable names witch makes it faster to work with them l latter on the program.

© Stack Overflow or respective owner

Related posts about php

Related posts about coding-style