1--TEST-- 2Test strrpos() function : usage variations - multi line heredoc string for 'haystack' argument 3--FILE-- 4<?php 5/* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 7 * Source code: ext/standard/string.c 8*/ 9 10/* Test strrpos() function by passing multi-line heredoc string for haystack and 11 * with various needles & offsets 12*/ 13 14echo "*** Testing strrpos() 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( strrpos($multi_line_str, "ing", 0) ); 22var_dump( strrpos($multi_line_str, "ing", 15) ); 23var_dump( strrpos($multi_line_str, "ing", 22) ); 24var_dump( strrpos($multi_line_str, "") ); 25var_dump( strrpos($multi_line_str, " ") ); 26 27echo "*** Done ***"; 28?> 29--EXPECTF-- 30*** Testing strrpos() function: with heredoc strings *** 31-- With heredoc string containing multi lines -- 32int(44) 33int(44) 34int(44) 35bool(false) 36int(55) 37*** Done *** 38