1--TEST-- 2Test stripos() function : usage variations - multi line heredoc string 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 multi-line heredoc string for haystack and 11 * with various needles & offsets 12*/ 13 14echo "*** Testing stripos() function: with heredoc strings ***\n"; 15echo "-- With heredoc string containing multi lines --\n"; 16$multi_line_str = <<<EOD 17Example of string 18spanning multiple lines 19using heredoc syntax. 20EOD; 21var_dump( stripos($multi_line_str, "ing", 0) ); 22var_dump( stripos($multi_line_str, "ing", 15) ); 23var_dump( stripos($multi_line_str, "ing", 22) ); 24var_dump( stripos($multi_line_str, "") ); 25var_dump( stripos($multi_line_str, " ") ); 26 27echo "*** Done ***"; 28?> 29--EXPECTF-- 30*** Testing stripos() function: with heredoc strings *** 31-- With heredoc string containing multi lines -- 32int(14) 33int(23) 34int(23) 35bool(false) 36int(7) 37*** Done *** 38