Annotation of embedaddon/php/ext/pcre/tests/ungreedy.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: U (PCRE_UNGREEDY) modififer
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(preg_match('/<.*>/', '<aa> <bb> <cc>', $m));
! 7: var_dump($m);
! 8:
! 9: var_dump(preg_match('/<.*>/U', '<aa> <bb> <cc>', $m));
! 10: var_dump($m);
! 11:
! 12: var_dump(preg_match('/(?U)<.*>/', '<aa> <bb> <cc>', $m));
! 13: var_dump($m);
! 14:
! 15: ?>
! 16: --EXPECT--
! 17: int(1)
! 18: array(1) {
! 19: [0]=>
! 20: string(14) "<aa> <bb> <cc>"
! 21: }
! 22: int(1)
! 23: array(1) {
! 24: [0]=>
! 25: string(4) "<aa>"
! 26: }
! 27: int(1)
! 28: array(1) {
! 29: [0]=>
! 30: string(4) "<aa>"
! 31: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>