1--TEST--
2Test strrpos() function : usage variations - heredoc string containing escape chars for 'haystack' argument
3--FILE--
4<?php
5/* Test strrpos() function by passing heredoc string containing escape chars for haystack
6 *  and with various needles & offsets
7*/
8
9echo "*** Testing strrpos() function: with heredoc strings ***\n";
10echo "-- With heredoc string containing escape characters --\n";
11$control_char_str = <<<EOD
12Hello, World\n
13Hello\tWorld
14EOD;
15var_dump( strrpos($control_char_str, "\n") );
16var_dump( strrpos($control_char_str, "\t") );
17var_dump( strrpos($control_char_str, "\n", 12) );
18var_dump( strrpos($control_char_str, "\t", 15) );
19
20echo "*** Done ***";
21?>
22--EXPECT--
23*** Testing strrpos() function: with heredoc strings ***
24-- With heredoc string containing escape characters --
25int(13)
26int(19)
27int(13)
28int(19)
29*** Done ***
30