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

Code Inspection: Result of object allocation ignored

Last modified: 21 March 2023

Reports object allocation where the result of the allocated object is ignored, for example, new Error(); as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.