---
title: "PHP architecture"
manual: "TYPO3 Explained"
version: "14.3"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-best-practices@14.3"
source: "PhpArchitecture/Index.rst"
rendered: "2026-10-01T15:20:05+00:00"
---

# PHP architecture {#cgl-best-practices}

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@14.3)
-   [Services](https://docs.typo3.org/permalink/t3coreapi:services@14.3)
-   [Static methods, static classes, utility classes](https://docs.typo3.org/permalink/t3coreapi:static-methods-static-classes-utility-classes@14.3)
-   [Traits](https://docs.typo3.org/permalink/t3coreapi:traits@14.3)
-   [Working with exceptions](https://docs.typo3.org/permalink/t3coreapi:working-with-exceptions@14.3)
-   [Singletons](https://docs.typo3.org/permalink/t3coreapi:singletons@14.3)
-   [About readonly](https://docs.typo3.org/permalink/t3coreapi:about-readonly@14.3)
