We often work on large projects where it is necessary to store a large amount of variables that can be used when necessary, when they exceed the hundreds and reach the thousands it becomes difficult to remember them all by heart, since this forgetfulness is rather usual in programmers, the php team has developed a native function that allows, even in a very accurate and precise way to display them within an array.
The function that displays all the variables è get_defined_vars(), followed by how to use and exploit it:
echo print_r(get_defined_vars(), true);
In my opinion, it's a very useful feature that often reduces search time and searches in thousands of lines of code.
ATTENZIONE: il tuo commento verrà prima moderato e se ritenuto idoneo sarà pubblicato
