Annotation of embedaddon/php/ext/standard/tests/strings/strripos_variation4.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test strripos() function : usage variations - heredoc string containing special chars for 'haystack' argument
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : int strripos ( string $haystack, string $needle [, int $offset] );
        !             6:  * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack'
        !             7:  * Source code: ext/standard/string.c
        !             8: */
        !             9: 
        !            10: /* Test strripos() function by passing heredoc string containing special chars for haystack
        !            11:  *  and with various needles & offets 
        !            12: */
        !            13: 
        !            14: echo "*** Testing strripos() function: with heredoc strings ***\n";
        !            15: echo "-- With heredoc string containing special chars --\n";
        !            16: $special_chars_str = <<<EOD
        !            17: Ex'ple of h'doc st'g, contains
        !            18: $#%^*&*_("_")!#@@!$#$^^&$*(special)
        !            19: chars.
        !            20: EOD;
        !            21: var_dump( strripos($special_chars_str, "Ex'pLE", 0) );
        !            22: var_dump( strripos($special_chars_str, "!@@!", 23) );
        !            23: var_dump( strripos($special_chars_str, '_') );
        !            24: var_dump( strripos($special_chars_str, '("_")') );
        !            25: var_dump( strripos($special_chars_str, "$*") );
        !            26: var_dump( strripos($special_chars_str, "$*", 10) );
        !            27: var_dump( strripos($special_chars_str, "(speCIal)") );
        !            28: 
        !            29: ?>
        !            30: ===DONE===
        !            31: --EXPECTF--
        !            32: *** Testing strripos() function: with heredoc strings ***
        !            33: -- With heredoc string containing special chars --
        !            34: int(0)
        !            35: bool(false)
        !            36: int(41)
        !            37: int(39)
        !            38: int(55)
        !            39: int(55)
        !            40: int(57)
        !            41: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>