1--TEST-- 2Test stripos() function : usage variations - empty heredoc string for 'haystack' argument 3--FILE-- 4<?php 5/* Test stripos() function by passing empty heredoc string for haystack 6 * and with various needles & offsets 7*/ 8 9echo "*** Testing stripos() function: with heredoc strings ***\n"; 10echo "-- With empty heredoc string --\n"; 11$empty_string = <<<EOD 12EOD; 13var_dump( stripos($empty_string, "") ); 14 15try { 16 stripos($empty_string, "", 1); 17} catch (ValueError $exception) { 18 echo $exception->getMessage() . "\n"; 19} 20var_dump( stripos($empty_string, FALSE) ); 21var_dump( stripos($empty_string, NULL) ); 22 23echo "*** Done ***"; 24?> 25--EXPECT-- 26*** Testing stripos() function: with heredoc strings *** 27-- With empty heredoc string -- 28int(0) 29stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) 30int(0) 31int(0) 32*** Done *** 33