// Kapitel 03 — Koncepter

Det moderne
PHP-fundament.

OOP, Traits, Namespaces, PSR-standarder — de centrale koncepter som får dit PHP til at føles som rigtigt sprogarbejde.

13
Koncepter
Dybdegående
Closures & Anonymous Functions
// 01

Closures & Anonymous Functions

Fundamentals

Anonymous functions, closures, arrow functions og callback patterns i moderne PHP

MellemLær
Composer Autoloading
// 02

Composer Autoloading

Tools

Automatisk loading af PHP classes med Composer's PSR-4 autoloader

BegynderLær
Dependency Injection
// 03

Dependency Injection

Design Patterns

Inversion of Control pattern til løs kobling mellem components

Mellem til AvanceretLær
Error & Exception Handling
// 04

Error & Exception Handling

Fundamentals

Try-catch blocks, custom exceptions, error handlers og Throwable hierarchy i moderne PHP

MellemLær
Generators & Iterators
// 05

Generators & Iterators

Fundamentals

Memory-effektiv iteration med yield keyword, generator functions og generator delegation i PHP

Mellem til AvanceretLær
Magic Methods
// 06

Magic Methods

Fundamentals

Special methods som __construct, __get, __set, __call, __toString, __invoke og andre magic methods i PHP

MellemLær
Namespaces
// 07

Namespaces

Fundamentals

Organisering af kode og undgåelse af navnekonflikter med namespaces

BegynderLær
Object-Oriented Programming (OOP)
// 08

Object-Oriented Programming (OOP)

Fundamentals

Objektorienteret programmering i PHP med classes, objects, inheritance og encapsulation

Begynder til MellemLær
PHP Hosting
// 09

PHP Hosting

Infrastructure

Alt om hosting til PHP applikationer - webhotel, VPS, cloud hosting og managed platforms.

BegynderLær
PSR Standards
// 10

PSR Standards

Standards

PHP Standard Recommendations for code style og arkitektur

MellemLær
Standard PHP Library (SPL)
// 11

Standard PHP Library (SPL)

Fundamentals

Built-in collection af interfaces, classes og functions til iteration, data structures og exceptions

Mellem til AvanceretLær
Traits
// 12

Traits

Advanced

Genbrugelige metoder på tværs af multiple classes uden inheritance

MellemLær
PHP Type System
// 13

PHP Type System

Fundamentals

Scalar types, union types, intersection types, mixed, never, void og type declarations i moderne PHP

Mellem til AvanceretLær