Annotation of embedaddon/php/ext/ereg/tests/ereg_basic_004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test ereg() function : basic functionality - a few non-matches
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : proto int ereg(string pattern, string string [, array registers])
! 6: * Description: Regular expression match
! 7: * Source code: ext/standard/reg.c
! 8: * Alias to functions:
! 9: */
! 10:
! 11: $regs = 'original';
! 12:
! 13: var_dump(ereg('A', 'a', $regs));
! 14: var_dump(ereg('[A-Z]', '0', $regs));
! 15: var_dump(ereg('(a){4}', 'aaa', $regs));
! 16: var_dump(ereg('^a', 'ba', $regs));
! 17: var_dump(ereg('b$', 'ba', $regs));
! 18: var_dump(ereg('[:alpha:]', 'x', $regs));
! 19:
! 20: // Ensure $regs is unchanged
! 21: var_dump($regs);
! 22:
! 23: echo "Done";
! 24: ?>
! 25: --EXPECTF--
! 26: Deprecated: Function ereg() is deprecated in %s on line %d
! 27: bool(false)
! 28:
! 29: Deprecated: Function ereg() is deprecated in %s on line %d
! 30: bool(false)
! 31:
! 32: Deprecated: Function ereg() is deprecated in %s on line %d
! 33: bool(false)
! 34:
! 35: Deprecated: Function ereg() is deprecated in %s on line %d
! 36: bool(false)
! 37:
! 38: Deprecated: Function ereg() is deprecated in %s on line %d
! 39: bool(false)
! 40:
! 41: Deprecated: Function ereg() is deprecated in %s on line %d
! 42: bool(false)
! 43: string(8) "original"
! 44: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>