Annotation of embedaddon/php/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test get_magic_quotes_runtime() function
                      3: --INI--
                      4: magic_quotes_runtime = 0
                      5: --FILE--
                      6: <?php
                      7: /* Prototype: int get_magic_quotes_runtime  ( void  )
                      8:  * Description: Gets the current active configuration setting of magic_quotes_runtime
                      9: */
                     10: 
                     11: echo "Simple testcase for get_magic_quotes_runtime() function\n";
                     12: 
                     13: $g = get_magic_quotes_runtime();
                     14: echo "\n-- magic quotes runtime set in INI file: " . $g . " --\n";
                     15: 
                     16: echo "\n-- Set magic quotes runtime to 1:  --\n";
                     17: var_dump(set_magic_quotes_runtime(1));
                     18: $g = get_magic_quotes_runtime();
                     19: echo "\n-- magic quotes runtime after set: " . $g . " --\n";
                     20: 
                     21: echo "\n-- Set magic quotes runtime to 0:  --\n";
                     22: var_dump(set_magic_quotes_runtime(0));
                     23: $g = get_magic_quotes_runtime();
                     24: echo "\n-- magic quotes runtime after set: " . $g . " --\n";
                     25: 
                     26: echo "\n-- Set magic quotes runtime to 1:  --\n";
                     27: var_dump(set_magic_quotes_runtime(1));
                     28: $g = get_magic_quotes_runtime();
                     29: echo "\n-- magic quotes runtime after set: " . $g . " --\n";
                     30: 
                     31: echo "\n-- Error cases --\n"; 
                     32: // no checks on number of args
                     33: var_dump(get_magic_quotes_runtime(true)); 
                     34: 
                     35: ?>
                     36: ===DONE===
                     37: --EXPECTF--
                     38: Simple testcase for get_magic_quotes_runtime() function
                     39: 
                     40: -- magic quotes runtime set in INI file: 0 --
                     41: 
                     42: -- Set magic quotes runtime to 1:  --
                     43: 
                     44: Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
                     45: bool(true)
                     46: 
                     47: -- magic quotes runtime after set: 1 --
                     48: 
                     49: -- Set magic quotes runtime to 0:  --
                     50: 
                     51: Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
                     52: bool(true)
                     53: 
                     54: -- magic quotes runtime after set: 0 --
                     55: 
                     56: -- Set magic quotes runtime to 1:  --
                     57: 
                     58: Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
                     59: bool(true)
                     60: 
                     61: -- magic quotes runtime after set: 1 --
                     62: 
                     63: -- Error cases --
                     64: int(1)
                     65: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>