这两者之间允许什么:
$value = 'value'; $user = 'John'; $timestamp = 1480927909; $day = date('Y-m-d',$timestamp);
要么
$value = 'value'; $user = 'John'; $timestamp = 1480927909; $day = date('Y-m-d',$timestamp);
PSR-2没有针对这种线间对齐的具体规则:
原文链接:https://www.f2er.com/php/137305.htmlThere are many elements of style and practice intentionally omitted by this guide. These include but are not limited to:
- Declaration of global variables and global constants
- Declaration of functions
- Operators and assignment
- Inter-line alignment
- Comments and documentation blocks
- Class name prefixes and suffixes
- Best practices
Future recommendations MAY revise and extend this guide to address those or other elements of style and practice.
对于它的价值,PHP-FIG Group的行间对齐是discussed for PSR-1,但是从最终版本中删除了:
The way-back original long-form PSR-1 covered inter-line alignment,globals,ternaries,assignment,and lots of other things. Those ended up getting removed for varIoUs reasons; their epitaph is at the conclusion of PSR-2.