Skip to main content

Everything you Need to Know About PSR | PSR 2019 | Windzoon Technologies

Best Web Design Company in India

PSR also known as PHP Standard Recommendation, it is a PHP specification that is used in many standardize programs. Mainly it is used to enable component interoperability and provide a basic technical basis for implementing concepts to improve programming. It is established by the PHP Framework Interop Group. The PSR standards use for example to be able to develop different components for Laravel that work effectively with other frameworks like Symfony. 

Here are the main 4 types of PSR as per the Best Web Design Company in India, 

1. Accepted

=>PSR-1: Basic Coding Standard

=>PSR-6: Caching Interface

=>PSR-12: Extended Coding Style Guide

2. Deprecated

=>PSR-0: Autoloading Standard

=>PSR-2: Coding Style Guide

3. Draft 

=>PSR-5: PHPDoc Standard

=>PSR-19: PHPDoc tags

4. Abandoned

=>PSR-9: Security Advisories

=>PSR-10: Security Reporting Process

Here are some detail information about main PSR’s

PSR-1: Basic Coding standard

Here it includes what should be considered the standard coding parts required to ensure a high level of technical interoperability between shared PHP code.
=>PHP code MUST use only <?php and <?= tags.

=>PHP code MUST use only UTF-8 without BOM.

=>Class names MUST be listed in StudlyCaps.

=>Class constants MUST be reported in all uppercase with underscore separators.

=>Method names MUST be listed in camelCase.

PSR-6: Caching Interface

Caching is a way you can improve the overall performance of the project, making caching libraries is a common feature of many frameworks and libraries. 

Here are the main two key concepts, 

1. Pool

It represents a collection of items in a caching system. The pool is a valid container of all the items it contains. All cacheable items retrieved from the pool as an item object and all communication of cached objects passes through the pool.

2. Items

The item represents a single or value pair within a Pool. The key is the initial unique identifier for an Item. Also, its value may be changed at any time. 

PSR-12: Extended Coding Style Guide

This PSR provides a set that coding style tools can implement, projects can declare adherence to and developers can relate with different projects. When multiple authors collaborate across multiple projects it becomes very helpful to have a set of guidelines to use among all those projects. 


==>There must not be a harsh limit on line length.

==>Lines should not be longer than 80 characters

==>There must not be tracing whitespace at the end of the lines.

==>Make sure there must be only one statement per line.

Read more:"Best Web Design Company in India"

Comments

Popular posts from this blog

Why Should You Choose Magento As An E-Commerce Platform

Given the brilliance of technology, the last few years have seen a major boost in online shopping. The ability to purchase from the comfort of your homes, while carefully browsing through a huge collection of products at your own pace has made lives so much simpler.  With more and more companies transitioning online, e-commerce platforms have become the need of the generation. While the Web is a gold mine for e-commerce platforms, many businesses are skeptical of the credibility of a software application.  When starting your online business, sellers look for a platform that ensures scalable and long-term growth. If you are in search of a software application that is power-packed with benefits for your online venture,  Magento development company in India  is the best choice. What Is Magento? Magento is an open-source, e-commerce platform with a built-in PHP framework. It provides developers and online sellers with a space to build their store, and they have control o...

5 Key Features of Moodle LMS

Moodle LMS is an online learning management system, it gives an option to anyone to develop their private website. With the continuous addition of features in the Moodle, the core makes it more user-friendly and robust. As per Moodle developers in India , here are 5 key feature of Moodle which makes Moofle popular till today,  1. Social Learning 2. Gamification 3. eCommerce   4. Cloud Hosting 5. Analytics ==> Social Learning As per moodle consultant India , a course includes topics that learners engage in, take assessments, collaborate, etc. and then move on to a new topic. It quite seems boring. But it only depends on individual choice, and most of us stuck with this choice, unfortunately, and then Moodle takes the grudge of being boring. Moodle offers customization that can allow an interface similar to such other popular social tools with a different timeline of posts, filtering of the timeline, and integration with various activitie...

Best Wordpress Design and Development Agency in Ireland

With a team of experienced WordPress developers, Windzoon Technologies is one of the foremost WordPress Development Company in Ireland . We develop impressive content-based WordPress websites utilizing the WordPress platform, balancing to cater to the client’s business requirement. Our coding and designing have always been appreciated for their innovation and ease. We always promise superior quality and price efficiency of each product we deliver. We also build specific, multi-site WordPress Web Development, Plugins and custom WordPress Development for Dublin area to serve solutions who require web applications from scratch to the customer. We believe an equivalent reason made us the perfect choice for many satisfied customers across the world. Why WordPress? Write without worry – the WordPress editor is fast, instinctive, and saves content edits every few seconds. Easy to use and maintain – WordPress is far and away the only of the most stream content management systems and even user...