---
title: "PHP architecture"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-best-practices@13.4"
source: "PhpArchitecture/Index.rst"
rendered: "2026-09-23T17:02:48+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@13.4)
-   [Services](https://docs.typo3.org/permalink/t3coreapi:services@13.4)
-   [Static Methods, static Classes, Utility Classes](https://docs.typo3.org/permalink/t3coreapi:static-methods-static-classes-utility-classes@13.4)
-   [Traits](https://docs.typo3.org/permalink/t3coreapi:traits@13.4)
-   [Working with exceptions](https://docs.typo3.org/permalink/t3coreapi:working-with-exceptions@13.4)
-   [Singletons](https://docs.typo3.org/permalink/t3coreapi:singletons@13.4)
-   [About readonly](https://docs.typo3.org/permalink/t3coreapi:about-php-readonly@13.4)
