PSR Standards & HTTP Messages Flashcards

1
Q

PSR 4 is…

A

Autoloading Standard, describes how namespaces should be built and the corresponding directory structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which PSR describes how HTTP Messages (Requests and Responses) need to be structured?

A

PSR 7 HTTP Message Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which PSR dictates Constants are in UPPER_CASE?

A

PSR-1 Basic Coding Standard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which PSR describes the standard for dependency injection?

A

PSR 11 Container Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

PSR 18 …

A

HTTP Client, describes handling of sending http requests with a client Object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HTTP Factories are what PSR and what purpose?

A

PSR 17, Mainly offers interfaces for Factories creating Request and Response objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In which PSR is described what behaviour an Event Listener should have?

A

PSR 14 Event Dispatcher

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Psr 7 is…

A

Caching Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Logging is described in PSR…

A

PSR-3 Logger Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What Log Levels exist?

A

DEBUG, NOTICE, INFO, CRITICAL, WARNING, ALERT, ERROR, EMERGENCY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In which PSR is stated that files containing only PHP MUST NOT end with “?>” ?

A

PSR-12 Extended Coding Style

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

PSR-13 …

A

Hypermedia Links, describing Object Interfaces for a tag links in frontend in a PHP Foramt.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Middleware is defined where?

A

PSR-15 HTTP Server Request Handlers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Caching Libraries PSR?

A

PSR-16 Common Interface for Caching Libraries, basically caching libraries should work like the HTTP Cache does.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Fill in the blanks for an HTTP Request:
____ ____ ____
Host: ____

____

  • POST
  • /path123
  • HTTP/1.1
  • argument1=value2
  • chickenlittle.com
A

POST /path123 HTTP/1.1
Host: chickenlittle.com
argument1=value2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly