1--TEST--
2Test stripcslashes() function : basic functionality
3--FILE--
4<?php
5
6/* Prototype  : string stripcslashes  ( string $str  )
7 * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ...,
8 *              octal and hexadecimal representation.
9 * Source code: ext/standard/string.c
10*/
11
12echo "*** Testing stripcslashes() : basic functionality ***\n";
13var_dump(stripcslashes('\H\e\l\l\o \W\or\l\d'));
14var_dump(stripcslashes('Hello World\\r\\n'));
15var_dump(stripcslashes('\\\Hello World'));
16var_dump(stripcslashes('\x48\x65\x6c\x6c\x6f \x57\x6f\x72\x6c\x64'));
17var_dump(stripcslashes('\110\145\154\154\157 \127\157\162\154\144'));
18
19var_dump(bin2hex(stripcslashes('\\a')));
20var_dump(bin2hex(stripcslashes('\\b')));
21var_dump(bin2hex(stripcslashes('\\f')));
22var_dump(bin2hex(stripcslashes('\\t')));
23var_dump(bin2hex(stripcslashes('\\v')));
24?>
25===DONE===
26--EXPECT--
27*** Testing stripcslashes() : basic functionality ***
28string(11) "Hello World"
29string(13) "Hello World
30"
31string(12) "\Hello World"
32string(11) "Hello World"
33string(11) "Hello World"
34string(2) "07"
35string(2) "08"
36string(2) "0c"
37string(2) "09"
38string(2) "0b"
39===DONE===
40