Annotation of embedaddon/php/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test get_magic_quotes_gpc() function
        !             3: --INI--
        !             4: magic_quotes_gpc = 0
        !             5: --FILE--
        !             6: <?php
        !             7: /* Prototype: int get_magic_quotes_gpc  ( void  )
        !             8:  * Description: Gets the current configuration setting of magic quotes gpc
        !             9: */
        !            10: 
        !            11: echo "Simple testcase for get_magic_quotes_gpc() function\n";
        !            12: 
        !            13: $g = get_magic_quotes_gpc();
        !            14: echo "\n-- magic quotes gpc set in INI file: " . $g . " --\n";
        !            15: 
        !            16: echo "\n-- Set magic quotes gpc to 1 - not allowed so should fail! --\n";
        !            17: var_dump(ini_set("magic_quotes_gpc", 1));
        !            18: $g = get_magic_quotes_gpc();
        !            19: echo "\n-- magic quotes gpc after set: " . $g . " --\n";
        !            20: 
        !            21: echo "\n-- Set magic quotes gpc to 0:  --\n";
        !            22: var_dump(ini_set("magic_quotes_gpc", 0));
        !            23: $g = get_magic_quotes_gpc();
        !            24: echo "\n-- magic quotes gpc after set: " . $g . " --\n";
        !            25: 
        !            26: echo "\n-- Error cases --\n"; 
        !            27: // no checks on number of args
        !            28: var_dump(get_magic_quotes_gpc(true)); 
        !            29: 
        !            30: ?>
        !            31: ===DONE===
        !            32: --EXPECT--
        !            33: Simple testcase for get_magic_quotes_gpc() function
        !            34: 
        !            35: -- magic quotes gpc set in INI file: 0 --
        !            36: 
        !            37: -- Set magic quotes gpc to 1 - not allowed so should fail! --
        !            38: bool(false)
        !            39: 
        !            40: -- magic quotes gpc after set: 0 --
        !            41: 
        !            42: -- Set magic quotes gpc to 0:  --
        !            43: bool(false)
        !            44: 
        !            45: -- magic quotes gpc after set: 0 --
        !            46: 
        !            47: -- Error cases --
        !            48: int(0)
        !            49: ===DONE===

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