get_defined_vars
symfony/var-dumper
Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Returns an array of all defined variables
<?php get_defined_vars
(): array