PhpStorm 2020.3 Help

Code Inspection: Method __toString implementation

Reports the attempts to convert the objects having no __toString method implementation to string .

In PHP 5.2.0 and later, such attempts will cause E_RECOVERABLE_ERROR . See __toString ( for details.

If the Check __toString exists for each expression type option is enabled, the inspection will check all possible types of the expression and report if at least one ot them doesn't contain the __toString method implementation.

Last modified: 08 December 2020