summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/add-and-stripslashes.phpt
blob: 1c65aefda6b85f77d003377435c5ed078765bbae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
addslashes() and stripslashes() functions, normal and sybase-style
--POST--
--GET--
--FILE--
<?php

$input = '';
for($i=0; $i<512; $i++) {
	$input .= chr($i%256);
}

echo "Normal: ";
ini_set('magic_quotes_sybase', 0);
if($input === stripslashes(addslashes($input))) {
	echo "OK\n";
} else {
	echo "FAILED\n";
}

echo "Sybase: ";
ini_set('magic_quotes_sybase', 1);
if($input === stripslashes(addslashes($input))) {
	echo "OK\n";
} else {
	echo "FAILED\n";
}

?>
--EXPECT--
Normal: OK
Sybase: OK