1--TEST--
2Test strrpos() function : usage variations - multi line heredoc string for 'haystack' argument
3--FILE--
4<?php
5/* Test strrpos() function by passing multi-line heredoc string for haystack and
6 *  with various needles & offsets
7*/
8
9echo "*** Testing strrpos() function: with heredoc strings ***\n";
10echo "-- With heredoc string containing multi lines --\n";
11$multi_line_str = <<<EOD
12Example of string
13spanning multiple lines
14using heredoc syntax.
15EOD;
16var_dump( strrpos($multi_line_str, "ing", 0) );
17var_dump( strrpos($multi_line_str, "ing", 15) );
18var_dump( strrpos($multi_line_str, "ing", 22) );
19var_dump( strrpos($multi_line_str, "") );
20var_dump( strrpos($multi_line_str, " ") );
21
22echo "*** Done ***";
23?>
24--EXPECT--
25*** Testing strrpos() function: with heredoc strings ***
26-- With heredoc string containing multi lines --
27int(44)
28int(44)
29int(44)
30int(63)
31int(55)
32*** Done ***
33