---
title: "PHP best practices"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-best-practices@11.5"
source: "CodingGuidelines/CodingBestPractices/Index.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

# PHP best practices {#cgl-best-practices}

This section documents some best practices when developing for TYPO3.
Most areas are documented in more detail at different places, this
part is just an overview of common pitfalls and generic tips.

-   [Named arguments](https://docs.typo3.org/permalink/t3coreapi:named-arguments@11.5)
-   [Accessing the database](https://docs.typo3.org/permalink/t3coreapi:accessing-the-database@11.5)
-   [Singletons](https://docs.typo3.org/permalink/t3coreapi:singletons@11.5)
-   [Static methods](https://docs.typo3.org/permalink/t3coreapi:static-methods@11.5)
-   [Unit Tests](https://docs.typo3.org/permalink/t3coreapi:unit-tests@11.5)
-   [Handling deprecations](https://docs.typo3.org/permalink/t3coreapi:handling-deprecations@11.5)
-   [Namespaces and class names of user files](https://docs.typo3.org/permalink/t3coreapi:namespaces-and-class-names-of-user-files@11.5)
