Annotation of embedaddon/php/ext/mbstring/tests/mb_ereg3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: mb_ereg() returning matches
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded('mbstring')) die('skip mbstring not enabled');
! 6: if (!function_exists("mb_ereg")) print "skip mb_ereg() not available";
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: $a = -1; $b = -1; $c = -1;
! 12: mbereg($a, $b, $c);
! 13: var_dump($a, $b, $c);
! 14:
! 15: mberegi($a, $b, $c);
! 16: var_dump($a, $b, $c);
! 17:
! 18: mbereg_search_init($a, $b, $c);
! 19: var_dump($a, $b, $c);
! 20:
! 21: echo "Done\n";
! 22: ?>
! 23: --EXPECTF--
! 24: int(-1)
! 25: int(-1)
! 26: array(1) {
! 27: [0]=>
! 28: string(2) "-1"
! 29: }
! 30: int(-1)
! 31: int(-1)
! 32: array(1) {
! 33: [0]=>
! 34: string(2) "-1"
! 35: }
! 36:
! 37: Warning: mbereg_search_init() expects parameter 3 to be %binary_string_optional%, array given in %s on line %d
! 38: int(-1)
! 39: int(-1)
! 40: array(1) {
! 41: [0]=>
! 42: string(2) "-1"
! 43: }
! 44: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>