1--TEST-- 2Test get_magic_quotes_gpc() function 3--INI-- 4magic_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 11echo "Simple testcase for get_magic_quotes_gpc() function\n"; 12 13$g = get_magic_quotes_gpc(); 14echo "\n-- magic quotes gpc set in INI file: " . $g . " --\n"; 15 16echo "\n-- Set magic quotes gpc to 1 - not allowed so should fail! --\n"; 17var_dump(ini_set("magic_quotes_gpc", 1)); 18$g = get_magic_quotes_gpc(); 19echo "\n-- magic quotes gpc after set: " . $g . " --\n"; 20 21echo "\n-- Set magic quotes gpc to 0: --\n"; 22var_dump(ini_set("magic_quotes_gpc", 0)); 23$g = get_magic_quotes_gpc(); 24echo "\n-- magic quotes gpc after set: " . $g . " --\n"; 25 26echo "\n-- Error cases --\n"; 27// no checks on number of args 28var_dump(get_magic_quotes_gpc(true)); 29 30?> 31===DONE=== 32--EXPECT-- 33Simple 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! -- 38bool(false) 39 40-- magic quotes gpc after set: 0 -- 41 42-- Set magic quotes gpc to 0: -- 43bool(false) 44 45-- magic quotes gpc after set: 0 -- 46 47-- Error cases -- 48int(0) 49===DONE===