1--TEST--
2Test addcslashes() function (variation 3)
3--INI--
4precision=14
5--FILE--
6<?php
7
8/* Miscellaneous input */
9echo "\n*** Testing addcslashes() with miscellaneous input arguments ***\n";
10var_dump( addcslashes("", "") );
11var_dump( addcslashes("", "burp") );
12var_dump( addcslashes("kaboemkara!", "") );
13var_dump( addcslashes("foobarbaz", 'bar') );
14var_dump( addcslashes('foo[ ]', 'A..z') );
15var_dump( @addcslashes("zoo['.']", 'z..A') );
16var_dump( addcslashes('abcdefghijklmnopqrstuvwxyz', "a\145..\160z") );
17var_dump( addcslashes( 123, 123 ) );
18var_dump( addcslashes( 0, 0 ) );
19var_dump( addcslashes( "\0" , 0 ) );
20var_dump( addcslashes( -1.234578, 3 ) );
21var_dump( addcslashes( " ", " ") );
22var_dump( addcslashes( "string\x00with\x00NULL", "\0") );
23
24echo "Done\n";
25
26?>
27--EXPECTF--
28*** Testing addcslashes() with miscellaneous input arguments ***
29string(0) ""
30string(0) ""
31string(11) "kaboemkara!"
32string(14) "foo\b\a\r\b\az"
33string(11) "\f\o\o\[ \]"
34string(10) "\zoo['\.']"
35string(40) "\abcd\e\f\g\h\i\j\k\l\m\n\o\pqrstuvwxy\z"
36string(6) "\1\2\3"
37string(2) "\0"
38string(1) "%0"
39string(10) "-1.2\34578"
40string(2) "\ "
41string(22) "string\000with\000NULL"
42Done
43