1--TEST--
2Test get_magic_quotes_runtime() function
3--INI--
4magic_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
11echo "Simple testcase for get_magic_quotes_runtime() function\n";
12
13$g = get_magic_quotes_runtime();
14echo "\n-- magic quotes runtime set in INI file: " . $g . " --\n";
15
16echo "\n-- Set magic quotes runtime to 1:  --\n";
17var_dump(set_magic_quotes_runtime(1));
18$g = get_magic_quotes_runtime();
19echo "\n-- magic quotes runtime after set: " . $g . " --\n";
20
21echo "\n-- Set magic quotes runtime to 0:  --\n";
22var_dump(set_magic_quotes_runtime(0));
23$g = get_magic_quotes_runtime();
24echo "\n-- magic quotes runtime after set: " . $g . " --\n";
25
26echo "\n-- Set magic quotes runtime to 1:  --\n";
27var_dump(set_magic_quotes_runtime(1));
28$g = get_magic_quotes_runtime();
29echo "\n-- magic quotes runtime after set: " . $g . " --\n";
30
31echo "\n-- Error cases --\n";
32// no checks on number of args
33var_dump(get_magic_quotes_runtime(true));
34
35?>
36===DONE===
37--EXPECTF--
38Simple 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
44Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
45bool(true)
46
47-- magic quotes runtime after set: 1 --
48
49-- Set magic quotes runtime to 0:  --
50
51Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
52bool(true)
53
54-- magic quotes runtime after set: 0 --
55
56-- Set magic quotes runtime to 1:  --
57
58Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
59bool(true)
60
61-- magic quotes runtime after set: 1 --
62
63-- Error cases --
64int(1)
65===DONE===
66