---
title: "PHP architecture"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-best-practices@main"
source: "PhpArchitecture/Index.rst"
modified: "2026-09-16T13:05:25+00:00"
---

# PHP architecture

Writing excellent PHP code within the TYPO3 framework involves more than just correctly
utilizing the framework's API: It also requires making sound decisions regarding general
PHP architecture.

This chapter addresses general PHP architectural considerations and best
practices, with a focus on TYPO3. It covers both overarching principles of
good PHP architecture relevant to TYPO3 Core developers and best practices
specifically for extension developers.

-   [Named arguments](https://docs.typo3.org/permalink/t3coreapi:named-arguments@main)
-   [Services](https://docs.typo3.org/permalink/t3coreapi:services@main)
-   [Static methods, static classes, utility classes](https://docs.typo3.org/permalink/t3coreapi:static-methods-static-classes-utility-classes@main)
-   [Traits](https://docs.typo3.org/permalink/t3coreapi:traits@main)
-   [Working with exceptions](https://docs.typo3.org/permalink/t3coreapi:working-with-exceptions@main)
-   [Singletons](https://docs.typo3.org/permalink/t3coreapi:singletons@main)
-   [About readonly](https://docs.typo3.org/permalink/t3coreapi:about-readonly@main)
