2 /* Prototype : string strrev(string $str);
3 * Description: Reverse a string
4 * Source code: ext/standard/string.c
7 /* Testing strrev() function with various single quoted strings for 'str' */
9 echo "*** Testing strrev() : with various single quoted strings ***\n";
13 //strings containing escape chars
16 '\ttesting\ttesting\tstrrev',
17 'testing\rstrrev testing strrev',
18 'testing\fstrrev \f testing \nstrrev',
19 '\ntesting\nstrrev\n testing \n strrev',
20 'using\vvertical\vtab',
33 //concatenated strings
34 'Hello'.chr(0).'World',
38 //strings containing white spaces
44 //strings containing quotes
48 //special chars in string
49 't@@#$% %test ^test &test *test +test -test',
50 '!test ~test `test` =test= @test@test.com',
51 '/test/r\test\strrev\t\u /uu/',
58 for( $index = 0; $index < count($strings); $index++
) {
59 echo "\n-- Iteration $count --\n";
60 var_dump( strrev($strings[$index]) );