1--TEST-- 2Test strrpos() function : usage variations - heredoc string containing special chars for 'haystack' argument 3--FILE-- 4<?php 5/* Test strrpos() function by passing heredoc string containing special chars for haystack 6 * and with various needles & offsets 7*/ 8 9echo "*** Testing strrpos() function: with heredoc strings ***\n"; 10echo "-- With heredoc string containing special chars --\n"; 11$special_chars_str = <<<EOD 12Ex'ple of h'doc st'g, contains 13$#%^*&*_("_")!#@@!$#$^^&$*(special) 14chars. 15EOD; 16var_dump( strrpos($special_chars_str, "Ex'ple", 0) ); 17var_dump( strrpos($special_chars_str, "!@@!", 23) ); 18var_dump( strrpos($special_chars_str, '_') ); 19var_dump( strrpos($special_chars_str, '("_")') ); 20var_dump( strrpos($special_chars_str, "$*") ); 21var_dump( strrpos($special_chars_str, "$*", 10) ); 22var_dump( strrpos($special_chars_str, "(special)") ); 23 24echo "*** Done ***"; 25?> 26--EXPECT-- 27*** Testing strrpos() function: with heredoc strings *** 28-- With heredoc string containing special chars -- 29int(0) 30bool(false) 31int(41) 32int(39) 33int(55) 34int(55) 35int(57) 36*** Done *** 37