As the question, I am engaged in a little mixed, who can be careful to talk about: 1, composer psr-0 and psr-4 In the difference; 2, psr-0 specifications and psr-4 specifications of the difference; 3. composer and php-fig. For example, I am a bit confused. Who can tell me carefully:
1. The difference between
Title, I'm a little confused, who can say it carefully:
1, the difference between psr-0 and psr-4 in composer;
2, the difference between the psr-0 norm and the psr-4 norm;
3, composer and Php-fig, who indulge who.
Reply content:
Title, I'm a little confused, who can say it carefully:1, the difference between
[PHP series] PHP recommended standard PSR-1, PSR-2, psr-1psr-2
At least the code. When I first went to college, the teacher taught us to write the code strictly and properly. The code is like a person, and the work is complete. The canonicalized code is controlled from the very beginning when you use the command line to edit the C language code, and you are force
Follow the automatic loading of the PSR-4 and follow the PSR-4 loading. Follow the PSR-4 of automatic loading, follow the PSR-4 loading, first of all here to understand the PSR-4, ProposingaStandardsRecommendation (put forward standard recommendations) abbreviation, is a PHP
PHP psr-0 psr-4 autoloading composer
In the previous article, we introduced PSR-0 and autoload-related content. Following the PSR-0, the PHP autoloading specification, the PHP-FIG has introduced a PSR-4 called the improved autoloading specification.
In the
PSR-1 basic code specification, psr-1 code specification
This article provides standards for the basic elements of the Code to ensure that the shared PHP code has a high degree of technical interconnectivity.
Key words: "MUST" ("MUST"), "must not/must not" ("must not"), and "need" ("REQUIRED "), "will" ("SHALL"), "no" ("shall not"), "SHOULD" ("shocould"), and "shouldn't" ("shocould NOT ") for detailed descr
);} Private Function Registerdefaultservices ($userSettings) {$defaultSettings = $this->defaultsettings; /** * This service must return a array or an * instance of \arrayaccess. * * @return array|\arrayaccess */$this [' settings '] = function () use ($userSettings, $defaultSettings) { return new Collection (Array_merge ($defaultSettings, $userSettings)); }; if (!isset ($this [' environment ')) {/** * This service must return a shared instance * of \
1. PSR-4 Specification: Automatic loading
Although it is noted in [Psr-4-meta] that PSR-4 is a supplement to the PSR-0 specification rather than a replacement, it has been written in [PSR-0] that PSR-0 was abandoned in 2014.10.2
Psr
PHP Standard recommendation shorthand, it should be called PSRs, that is, the series of recommended standards: the current adoption of the specification has PSR-0 (autoloading), PSR-1 (Basic Coding) , PSR-2 (Coding Style Guide), PSR-3 (Logger Interface),
What are the contents of the PSR Series specifications of PHP, what are the PHPPSR specifications?
Psr
PHP Standard recommendation shorthand, it should be called PSRs, that is, the series of recommended standards: the current adoption of the specification has PSR-0 (autoloading), PSR-1 (Basic Coding) ,
====================PSR-0 (Automatic loading specification)=======================The PSR-0 (autoloading standard) class auto-load specification, which is now obsolete (Deprecated), will be replaced by PSR-4.1. A fully qualified namespace and class name must follow the following structure "\vendorname\namespace\classname"2. Each namespace must have a top-level na
PSR is a series of PHP development specifications, divided into several versions, their own learning is also relatively superficial, but still want to be able to review the specification, in order to facilitate memory and follow, I put the key words for the necessary to pick up, do a simple necessary standard records. (It's a brick-moving ... )Https://github.com/PizzaLiu/PHP-FIGhttp://segmentfault.com/a/1190000002521577Official release file versionPSR
Talk not much, first put the error posted:Just started with the slim framework, after setting up the auto-loading files and routing files, I wrote a controller:PHP Use\psr\http\message\serverrequestinterface asRequest; Use\psr\http\message\responseinterface asResponse; Use\interop\container\containerinterface;classHomeController {protected $app; Public function_
Transferred from: http://www.cnblogs.com/x3d/p/php-psr-standards.htmlPsrPHP Standard recommendation shorthand, it should be called PSRs, that is, the series of recommended standards: the current adoption of the specification has PSR-0 (autoloading), PSR-1 (Basic Coding) , PSR-2 (Coding Style Guide),
Document Warehouse Address: Https://github.com/hfcorriez/fig-standards
PSR Standard Chinese version
PSR-0 Automatic loading
PSR-1 Basic Code specification
PSR-2 Code Style
PSR-3 Log Interface
Why standardize
Excerpt translated the official sentence Th
PSR Specification
PSR Specification
Introduction: PSR is a shorthand for PHP standard recommendations, PHP specifications developed by the PHP FIG organization, is the practice of PHP development standards. The purpose of these specifications is to: through the framework of the author or the representative of the framework of the discussion, with the minimum limi
PHP PSR-1 Basic Code Specification (Chinese version),
Basic code Specification
This specification formulates the relevant standards for the basic elements of Code,To ensure a high degree of technical interoperability between shared PHP code.
Keywords "must" ("must"), "must not/must not be" ("must not"), "Need" ("REQUIRED"),"Will" ("Shall"), "no" ("Shall not"), "should" ("should"), "shouldn't" ("should not"),Detailed descriptions of "recommended" ("RE
Some resources are listed first:
PSR-0 website Original
GitHub Source for PSR
The GitHub source of the PSR Chinese translation
There are several points to note beforehand:
In the translation section, I only select the main specifications in PSR-0 and
First, Introduction
First of all, here to understand psr,proposing a standards recommendation (the standard recommendation) abbreviation, is a PHP development specification, let us develop the code more reasonable, better maintenance, more readable. There are several criteria for PSR:
PSR-0: Auto Load
PSR-1:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.