First of all: do whatever you want. Secondly, here are two style conventions from two large projects, Drupal: Unary operators (operators that operate on only one value), such as ++, should not have a space between the operator and the variable or number they are operating on. and Symfony: Place...
php,coding-style,standards,psr-2
I think the best resource you're going to get is the PHP-FIG mailing list, specifically the archive on Google Groups. Here are some interesting discussions related to your question: Who voted and how for the coding standard The 'final' version, when it was hosted in the 'php-standards' group (later renamed...
As requested: comment posted as answer: PSR only applies to PHP code, it doesn't have anything to say regarding inline HTML, because the HTML simply isn't PHP. The output you get merely adds whitespace where, according to the standard, there should be whitespace - New lines after an opening {...
Yes, this is acceptable by the PSR-2 standard. The standard indicates: Blank lines MAY be added to improve readability and to indicate related blocks of code. ...