1--TEST-- 2Test strripos() function : usage variations - multi line heredoc string for 'haystack' argument 3--FILE-- 4<?php 5/* Test strripos() function by passing multi-line heredoc string for haystack and 6 * with various needles & offsets 7*/ 8 9echo "*** Testing strripos() function: with heredoc strings ***\n"; 10echo "-- With heredoc string containing multi lines --\n"; 11$multi_line_str = <<<EOD 12Example of string 13spanning multiple lines 14using heredoc syntax. 15EOD; 16 17echo "\n-- Multi line strings with +ve offsets -- \n"; 18var_dump( strripos($multi_line_str, "iNg", 0) ); 19var_dump( strripos($multi_line_str, "inG", 15) ); 20var_dump( strripos($multi_line_str, "Ing", 22) ); 21 22echo "\n-- Multi line strings with +ve offsets -- \n"; 23var_dump( strripos($multi_line_str, "Ing", -1) ); 24var_dump( strripos($multi_line_str, "Ing", -17) ); 25var_dump( strripos($multi_line_str, "Ing", -50) ); 26 27echo "\n-- Multi line strings with no offset -- \n"; 28var_dump( strripos($multi_line_str, "spAn") ); 29var_dump( strripos($multi_line_str, "IPlE") ); 30var_dump( strripos($multi_line_str, "") ); 31var_dump( strripos($multi_line_str, " ") ); 32 33?> 34--EXPECT-- 35*** Testing strripos() function: with heredoc strings *** 36-- With heredoc string containing multi lines -- 37 38-- Multi line strings with +ve offsets -- 39int(44) 40int(44) 41int(44) 42 43-- Multi line strings with +ve offsets -- 44int(44) 45int(44) 46bool(false) 47 48-- Multi line strings with no offset -- 49int(18) 50int(31) 51int(63) 52int(55) 53