PHP get_defined_vars() Function

PHP get_resource_type() Function
PHP floatval() Function

In this article, you will learn how to get all the defined functions in PHP. The get_defined_vars() function in PHP returns all defined variables, as an array.

what is the syntax of the GET_DEFINED_VARS() function in php?

get_defined_vars();

examples of the GET_DEFINED_VARS() function

Example 1. In this example, we get all defined variables, as an array.

<?php
$a = array("red", "green", "blue");

$arr = get_defined_vars();

print_r($arr["a"]);
?>
PHP get_resource_type() Function
PHP floatval() Function
en English
X
Scroll to Top