1--TEST--
2Test stripos() function : usage variations - heredoc string containing escape chars for 'haystack' argument
3--FILE--
4<?php
5/* Prototype  : int stripos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of first occurrence of a case-insensitive string
7 * Source code: ext/standard/string.c
8*/
9
10/* Test stripos() function by passing heredoc string containing escape chars for haystack
11 *  and with various needles & offsets
12*/
13
14echo "*** Testing stripos() function: with heredoc strings ***\n";
15echo "-- With heredoc string containing escape characters --\n";
16$control_char_str = <<<EOD
17Hello, World\n
18Hello\tWorld
19EOD;
20var_dump( stripos($control_char_str, "\n") );
21var_dump( stripos($control_char_str, "\t") );
22var_dump( stripos($control_char_str, "\n", 12) );
23var_dump( stripos($control_char_str, "\t", 15) );
24
25echo "*** Done ***";
26?>
27--EXPECT--
28*** Testing stripos() function: with heredoc strings ***
29-- With heredoc string containing escape characters --
30int(12)
31int(19)
32int(12)
33int(19)
34*** Done ***
35