The get_defined_vars() function is an inbuilt function in PHP which is used to returns an array of all defined variables. This function returns a multidimensional array which contains all the list of variables, environment etc.
Syntax:
array get_defined_vars( void )
Parameters: This function does not accepts any parameter.
Return Value: This function returns a multidimensional array of all the variables.