Annotation of embedaddon/php/ext/pcre/tests/study.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Study regex
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: var_dump(preg_match('/(?:(?:(?:(?:(?:(.))))))/  S', 'aeiou', $dump));
        !             7: var_dump($dump[1]);
        !             8: var_dump(preg_match('/(?:(?:(?:(?:(?:(.))))))/', 'aeiou', $dump));
        !             9: var_dump($dump[1]);
        !            10: 
        !            11: var_dump(preg_match('/(?>..)((?:(?>.)|.|.|.|u))/S', 'aeiou', $dump));
        !            12: var_dump($dump[1]);
        !            13: 
        !            14: // try to trigger usual "match known text" optimization
        !            15: var_dump(preg_match('/^aeiou$/S', 'aeiou', $dump));
        !            16: var_dump($dump[0]);
        !            17: var_dump(preg_match('/aeiou/S', 'aeiou', $dump));
        !            18: var_dump($dump[0]);
        !            19: 
        !            20: ?>
        !            21: --EXPECT--
        !            22: int(1)
        !            23: string(1) "a"
        !            24: int(1)
        !            25: string(1) "a"
        !            26: int(1)
        !            27: string(1) "i"
        !            28: int(1)
        !            29: string(5) "aeiou"
        !            30: int(1)
        !            31: string(5) "aeiou"

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