Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否允许在 PSR-12 的同一行上分配多个变量?
例如:
$count = $score = 0;
是的。如果没有明确说明,则没有标准。要么工作。
此外,像这样的链式分配只会使代码更干净,所以我个人认为不应该允许它的原因。
https://www.php-fig.org/psr/psr-12/