xref: /PHP-7.2/ext/dba/tests/dba008.phpt (revision 17ccbeec)
1--TEST--
2DBA magic_quotes_runtime Test
3--SKIPIF--
4<?php
5	die('skip, magic_quotes removed');
6	require_once(dirname(__FILE__) .'/skipif.inc');
7	die("info $HND handler used");
8?>
9--FILE--
10<?php
11	require_once(dirname(__FILE__) .'/test.inc');
12	echo "database handler: $handler\n";
13	if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
14		ini_set('magic_quotes_runtime', 0);
15		dba_insert("key1", '"', $db_file);
16		var_dump(dba_fetch("key1", $db_file));
17		ini_set('magic_quotes_runtime', 1);
18		var_dump(dba_fetch("key1", $db_file));
19		dba_replace("key1", '\"', $db_file);
20		var_dump(dba_fetch("key1", $db_file));
21		ini_set('magic_quotes_runtime', 0);
22		var_dump(dba_fetch("key1", $db_file));
23		dba_close($db_file);
24	} else {
25		echo "Error creating database\n";
26	}
27?>
28--CLEAN--
29<?php
30	require(dirname(__FILE__) .'/clean.inc');
31?>
32--EXPECTF--
33database handler: %s
34string(1) """
35string(2) "\""
36string(2) "\""
37string(1) """
38