Annotation of embedaddon/php/ext/ereg/tests/eregi_basic_004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test eregi() function : basic functionality - a few non-matches
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : proto int eregi(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(eregi('[A-Z]', '0', $regs));
! 14: var_dump(eregi('(a){4}', 'aaa', $regs));
! 15: var_dump(eregi('^a', 'ba', $regs));
! 16: var_dump(eregi('b$', 'ba', $regs));
! 17: var_dump(eregi('[:alpha:]', 'x', $regs));
! 18:
! 19: // Ensure $regs is unchanged
! 20: var_dump($regs);
! 21:
! 22: echo "Done";
! 23: ?>
! 24: --EXPECTF--
! 25: Deprecated: Function eregi() is deprecated in %s on line %d
! 26: bool(false)
! 27:
! 28: Deprecated: Function eregi() is deprecated in %s on line %d
! 29: bool(false)
! 30:
! 31: Deprecated: Function eregi() is deprecated in %s on line %d
! 32: bool(false)
! 33:
! 34: Deprecated: Function eregi() is deprecated in %s on line %d
! 35: bool(false)
! 36:
! 37: Deprecated: Function eregi() is deprecated in %s on line %d
! 38: bool(false)
! 39: string(8) "original"
! 40: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>