Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practici recomandate pentru cod bun în php http://www.php-fig.org/psr/psr-1/ #13

Closed
adrianharabula opened this issue Apr 17, 2017 · 1 comment
Assignees

Comments

@adrianharabula
Copy link
Owner

adrianharabula commented Apr 17, 2017

Ca să scriem cod frumos, putem urmări recomandări legate de scrierea codului PHP

This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.

Overview

  • Files MUST use only <?php and <?= tags.
  • Files MUST use only UTF-8 without BOM for PHP code.
  • Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
  • Namespaces and classes MUST follow an “autoloading” PSR: [PSR-0, PSR-4].
  • Class names MUST be declared in StudlyCaps.
  • Class constants MUST be declared in all upper case with underscore separators.
  • Method names MUST be declared in camelCase.

Full page here.

@adrianharabula adrianharabula added this to the interfaţa web milestone Apr 17, 2017
@adrianharabula adrianharabula changed the title practici recomandate pentru cod bun în php http://www.php-fig.org/psr/psr-1/ Practici recomandate pentru cod bun în php http://www.php-fig.org/psr/psr-1/ Apr 18, 2017
@adrianharabula
Copy link
Owner Author

altădată!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants