mirror of
https://github.com/php/php-src.git
synced 2024-10-22 16:57:05 +00:00
31 lines
486 B
PHP
31 lines
486 B
PHP
--TEST--
|
|
addslashes() and stripslashes() functions, normal and sybase-style
|
|
--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
|