It exists plenty of tools to do this directly when dumping your variables in your code.
Xdebug is an extension for PHP to assist with debugging and development. Among other things, this extension allows you to update your var_dump method to clearly display your dumps, with syntax highlighting and indentation for example.Learn more about Xdebug
If you work on a Symfony project, you probably know the VarDumper. This tool is a version of var_dump under steroids, which in addition to syntax highlighting allows you to unfold and fold your objects and arrays, like when you fold blocks of code in your favorite IDE.Learn more about VarDumper