diff options
Diffstat (limited to 'ext/ereg/tests/eregi_basic_004.phpt')
-rw-r--r-- | ext/ereg/tests/eregi_basic_004.phpt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/ereg/tests/eregi_basic_004.phpt b/ext/ereg/tests/eregi_basic_004.phpt new file mode 100644 index 0000000..78d8f5e --- /dev/null +++ b/ext/ereg/tests/eregi_basic_004.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test eregi() function : basic functionality - a few non-matches +--FILE-- +<?php +/* Prototype : proto int eregi(string pattern, string string [, array registers]) + * Description: Regular expression match + * Source code: ext/standard/reg.c + * Alias to functions: + */ + +$regs = 'original'; + +var_dump(eregi('[A-Z]', '0', $regs)); +var_dump(eregi('(a){4}', 'aaa', $regs)); +var_dump(eregi('^a', 'ba', $regs)); +var_dump(eregi('b$', 'ba', $regs)); +var_dump(eregi('[:alpha:]', 'x', $regs)); + +// Ensure $regs is unchanged +var_dump($regs); + +echo "Done"; +?> +--EXPECTF-- +Deprecated: Function eregi() is deprecated in %s on line %d +bool(false) + +Deprecated: Function eregi() is deprecated in %s on line %d +bool(false) + +Deprecated: Function eregi() is deprecated in %s on line %d +bool(false) + +Deprecated: Function eregi() is deprecated in %s on line %d +bool(false) + +Deprecated: Function eregi() is deprecated in %s on line %d +bool(false) +string(8) "original" +Done |