When you are developing new functionalities or adjusting or improving the current ones, you need to know what data the variables are going to be filled with at the time of code execution. In the case of PHP, there are several ways to do it. , using native methods such as: var_dump(), echo, print_r() or if you are going for something more elaborate and beautiful, in the case of Drupal use the devel module together with the kint library as a complement.