Annotation of embedaddon/php/ext/pcre/tests/bug34790.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #34790 (preg_match_all(), named capturing groups, variable assignment/return => crash)
! 3: --FILE--
! 4: <?php
! 5: function func1(){
! 6: $string = 'what the word and the other word the';
! 7: preg_match_all('/(?P<word>the)/', $string, $matches);
! 8: return $matches['word'];
! 9: }
! 10: $words = func1();
! 11: var_dump($words);
! 12: ?>
! 13: --EXPECT--
! 14: array(4) {
! 15: [0]=>
! 16: string(3) "the"
! 17: [1]=>
! 18: string(3) "the"
! 19: [2]=>
! 20: string(3) "the"
! 21: [3]=>
! 22: string(3) "the"
! 23: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>