Giter Site home page Giter Site logo

standards's Introduction

PGS Standards

These standards are exactly the same as PHP-FIG PSR standards, with two differencies:

  • you MAY use tabs for indenting
  • you MAY write PHP constants TRUE, FALSE, and NULL in upper case

Basically, PGS standards are suitable for all PHP developers who want to be compliant with well-known standards from the PHP-FIG, but also use tabs instead of spaces.

What standards have been passed so far?

  • PSR-0 - Autoloading Standard
  • PSR-1 - Basic Coding Standard
  • PGS-2 - Coding Style Guide, replaces PSR-2
  • PSR-4 - Improved Autoloader

Rationale

The 30 % of PHP projects use tabs. Once used character for indentation is extremely difficult to change, especially for bigger projects. Therefore standard PGS-2 in comparsion to the PSR-2 allows using tabs for indentation.

Since the PHP documentation writes constants TRUE, FALSE and NULL in upper case letters, allows PGS-2 in comparsion to the PSR-2 to write them in upper case too.

Using tabs or capital letters is optional. You must use the same variant in all codes from one Vendor.

standards's People

Contributors

dg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.