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

1.1     ! misho       1: --TEST--
        !             2: Test stripos() function : usage variations - multi line heredoc string for 'haystack' argument
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : int stripos ( string $haystack, string $needle [, int $offset] );
        !             6:  * Description: Find position of first occurrence of a case-insensitive string
        !             7:  * Source code: ext/standard/string.c
        !             8: */
        !             9: 
        !            10: /* Test stripos() function by passing multi-line heredoc string for haystack and 
        !            11:  *  with various needles & offsets
        !            12: */
        !            13: 
        !            14: echo "*** Testing stripos() function: with heredoc strings ***\n";
        !            15: echo "-- With heredoc string containing multi lines --\n";
        !            16: $multi_line_str = <<<EOD
        !            17: Example of string
        !            18: spanning multiple lines
        !            19: using heredoc syntax.
        !            20: EOD;
        !            21: var_dump( stripos($multi_line_str, "ing", 0) );
        !            22: var_dump( stripos($multi_line_str, "ing", 15) );
        !            23: var_dump( stripos($multi_line_str, "ing", 22) );
        !            24: var_dump( stripos($multi_line_str, "") );
        !            25: var_dump( stripos($multi_line_str, " ") );
        !            26: 
        !            27: echo "*** Done ***";
        !            28: ?>
        !            29: --EXPECTF--
        !            30: *** Testing stripos() function: with heredoc strings ***
        !            31: -- With heredoc string containing multi lines --
        !            32: int(14)
        !            33: int(23)
        !            34: int(23)
        !            35: bool(false)
        !            36: int(7)
        !            37: *** Done ***

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