Annotation of embedaddon/php/ext/standard/tests/strings/bug40915.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #40915 (addcslashes unexpected behavior with binary input)
3: --FILE--
4: <?php
5:
6: $str = (binary)"a\000z";
7:
8: var_dump(addslashes($str));
9: var_dump(addcslashes($str, (binary)""));
10: var_dump(addcslashes($str, (binary)"\000z"));
11: var_dump(addcslashes( $str, (binary)"z"));
12:
13: echo "Done\n";
14: ?>
15: --EXPECT--
16: string(4) "a\0z"
17: string(3) "a z"
18: string(7) "a\000\z"
19: string(4) "a \z"
20: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>