PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Creating PHP classes

Last modified: 22 June 2023

PhpStorm assumes that the namespaces in your project are arranged in compliance with the PSR-0/PSR-4 standard and enforces you to retain the folder structure and the namespace hierarchy in accordance with this standard when creating PHP classes.

When you specify the folder where the file that implements the new class will be stored, PhpStorm automatically updates the namespace for the class.