1--TEST--
2Test strrchr() function : usage variations - multi line heredoc string for 'haystack'
3--FILE--
4<?php
5/* Test strrchr() function by passing multi-line heredoc string for haystack and
6 *    with various needles
7*/
8
9echo "*** Testing strrchr() function: with heredoc strings ***\n";
10$multi_line_str = <<<EOD
11Example of string
12spanning multiple lines
13using heredoc syntax.
14EOD;
15
16$needles = array(
17  "ing",
18  "",
19  " ",
20  $multi_line_str //needle as haystack
21);
22
23//loop through to test strrchr() with each needle
24foreach($needles as $needle) {
25  var_dump( strrchr($multi_line_str, $needle) );
26}
27
28echo "*** Done ***";
29?>
30--EXPECT--
31*** Testing strrchr() function: with heredoc strings ***
32string(19) "ing heredoc syntax."
33bool(false)
34string(8) " syntax."
35string(63) "Example of string
36spanning multiple lines
37using heredoc syntax."
38*** Done ***
39