import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-strings / strrpos_variation6.php
blobdb546297d0f65cce5c28706de565938166fbd630
1 <?php
2 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
3 * Description: Find position of last occurrence of 'needle' in 'haystack'.
4 * Source code: ext/standard/string.c
5 */
7 /* Test strrpos() function by passing heredoc string containing quotes for haystack
8 * and with various needles & offsets
9 */
11 echo "*** Testing strrpos() function: with heredoc strings ***\n";
12 echo "-- With heredoc string containing quote & slash chars --\n";
13 $quote_char_str = <<<EOD
14 it's bright,but i cann't see it.
15 "things in double quote"
16 'things in single quote'
17 this\line is /with\slashs
18 EOD;
19 var_dump( strrpos($quote_char_str, "line") );
20 var_dump( strrpos($quote_char_str, 'things') );
21 var_dump( strrpos($quote_char_str, 'things', 0) );
22 var_dump( strrpos($quote_char_str, "things", 20) );
23 echo "*** Done ***";