diff options
Diffstat (limited to 'ext/standard/tests/general_functions/get_defined_vars_basic.phpt')
-rw-r--r-- | ext/standard/tests/general_functions/get_defined_vars_basic.phpt | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/standard/tests/general_functions/get_defined_vars_basic.phpt b/ext/standard/tests/general_functions/get_defined_vars_basic.phpt index 3aa6e72a92..b809dc9d55 100644 --- a/ext/standard/tests/general_functions/get_defined_vars_basic.phpt +++ b/ext/standard/tests/general_functions/get_defined_vars_basic.phpt @@ -3,47 +3,47 @@ Test get_defined_vars() function --FILE-- <?php /* Prototype: array get_defined_vars ( void ) - Description: This function returns a multidimensional array containing a list of all defined - variables, be them environment, server or user-defined variables, within the scope that + Description: This function returns a multidimensional array containing a list of all defined + variables, be them environment, server or user-defined variables, within the scope that get_defined_vars() is called. */ echo "Simple testcase for get_defined_vars() function\n\n"; function f1() { - echo "\n-- Function f1() called --\n"; + echo "\n-- Function f1() called --\n"; $vars = get_defined_vars(); - + if (count($vars) != 0) { - echo "TEST FAILED\n"; - } - - echo "\n-- ..define some local variables --\n"; + echo "TEST FAILED\n"; + } + + echo "\n-- ..define some local variables --\n"; $i = 123; $f = 123.456; $b = false; - $s = "Hello World"; + $s = "Hello World"; $arr = array(1,2,3,4); - var_dump( get_defined_vars() ); + var_dump( get_defined_vars() ); f2(); } function f2() { - echo "\n -- Function f2() called --\n"; + echo "\n -- Function f2() called --\n"; $vars= get_defined_vars(); - + if (count($vars) != 0) { - echo "TEST FAILED\n"; + echo "TEST FAILED\n"; } - - echo "\n-- ...define some variables --\n"; + + echo "\n-- ...define some variables --\n"; $i = 456; $f = 456.678; $b = true; - $s = "Goodnight"; - $arr = array("foo", "bar"); + $s = "Goodnight"; + $arr = array("foo", "bar"); var_dump( get_defined_vars() ); - + echo "\n-- ...define some more variables --\n"; $i1 = 456; $f1 = 456.678; @@ -56,8 +56,8 @@ echo "\n-- Get variables at global scope --\n"; $vars = get_defined_vars(); if (count($vars) == 0) { - echo "TEST FAILED - Global variables missing at global scope\n"; -} + echo "TEST FAILED - Global variables missing at global scope\n"; +} // call a function f1(); |