Every coding standard I've ever seen has a recommended or absolute limit on number of characters in a line. There are various ways of working within this limitation, but I've not seen any specific guidance in this regard.
Obviously, if possible, don't write excessively long lines.
But what if that's not practical? How should long lines be handled?
Here are a couple of examples
if ($Stmt = $Mysqli->prepare("SELECT color, pattern, size,
manufacturer, mfgSku, storeLocation,
aisle, status
FROM tblItems WHERE ourSku = ?")) {
or
$flavors = array ('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee', 'mocha chip');
or
$Stmt->bind_result( $this->_firstName,
$this->_lastName,
$this->_BillToAddress->address1,
$this->_BillToAddress->address2,
$this->_BillToAddress->city,
$this->_BillToAddress->state,
$this->_BillToAddress->zip,
$this->_BillToAddress->country,
$this->_email,
$this->_status,
$this->_primaryPhone,
$this->_mobilePhone );
In each of these examples, the indenting of lengthy code is different. Is there a better or more "standard" way of doing this? Should extra lines always be indented the same way. Or is this OK?