1--TEST--
2Test strripos() function : usage variations - heredoc string containing special chars for 'haystack' argument
3--FILE--
4<?php
5/* Test strripos() function by passing heredoc string containing special chars for haystack
6 *  and with various needles & offsets
7*/
8
9echo "*** Testing strripos() function: with heredoc strings ***\n";
10echo "-- With heredoc string containing special chars --\n";
11$special_chars_str = <<<EOD
12Ex'ple of h'doc st'g, contains
13$#%^*&*_("_")!#@@!$#$^^&$*(special)
14chars.
15EOD;
16var_dump( strripos($special_chars_str, "Ex'pLE", 0) );
17var_dump( strripos($special_chars_str, "!@@!", 23) );
18var_dump( strripos($special_chars_str, '_') );
19var_dump( strripos($special_chars_str, '("_")') );
20var_dump( strripos($special_chars_str, "$*") );
21var_dump( strripos($special_chars_str, "$*", 10) );
22var_dump( strripos($special_chars_str, "(speCIal)") );
23
24?>
25--EXPECT--
26*** Testing strripos() function: with heredoc strings ***
27-- With heredoc string containing special chars --
28int(0)
29bool(false)
30int(41)
31int(39)
32int(55)
33int(55)
34int(57)
35