1--TEST--
2Test stripos() function : usage variations - heredoc string containing quotes 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 quotes for haystack
11 *  and with various needles & offsets
12*/
13
14echo "*** Testing stripos() function: with heredoc strings ***\n";
15echo "-- With heredoc string containing quote & slash chars --\n";
16$quote_char_str = <<<EOD
17it's bright,but i cann't see it.
18"things in double quote"
19'things in single quote'
20this\line is /with\slashs
21EOD;
22var_dump( stripos($quote_char_str, "line") );
23var_dump( stripos($quote_char_str, 'things') );
24var_dump( stripos($quote_char_str, 'things', 0) );
25var_dump( stripos($quote_char_str, "things", 20) );
26echo "*** Done ***";
27?>
28--EXPECTF--
29*** Testing stripos() function: with heredoc strings ***
30-- With heredoc string containing quote & slash chars --
31int(88)
32int(34)
33int(34)
34int(34)
35*** Done ***
36