diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-09-11 11:06:57 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-09-11 11:06:57 +0400 |
commit | 1981dd9c73ada7ea893b4636b84211f68838ba23 (patch) | |
tree | 10685f35448e5afd4b970ccebf5fa9ce01953e48 /ext/ereg/tests/ereg_basic_004.phpt | |
parent | 98b8050433d25cc9c173360e01272836acd7307f (diff) | |
download | php-git-1981dd9c73ada7ea893b4636b84211f68838ba23.tar.gz |
Revert "Removing ext/ereg and dependencies"
This reverts commit 86de7963fe69638431c0aa8f413d25e01bf99d68.
Diffstat (limited to 'ext/ereg/tests/ereg_basic_004.phpt')
-rw-r--r-- | ext/ereg/tests/ereg_basic_004.phpt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/ereg/tests/ereg_basic_004.phpt b/ext/ereg/tests/ereg_basic_004.phpt new file mode 100644 index 0000000000..20bdf80073 --- /dev/null +++ b/ext/ereg/tests/ereg_basic_004.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test ereg() function : basic functionality - a few non-matches +--FILE-- +<?php +/* Prototype : proto int ereg(string pattern, string string [, array registers]) + * Description: Regular expression match + * Source code: ext/standard/reg.c + * Alias to functions: + */ + +$regs = 'original'; + +var_dump(ereg('A', 'a', $regs)); +var_dump(ereg('[A-Z]', '0', $regs)); +var_dump(ereg('(a){4}', 'aaa', $regs)); +var_dump(ereg('^a', 'ba', $regs)); +var_dump(ereg('b$', 'ba', $regs)); +var_dump(ereg('[:alpha:]', 'x', $regs)); + +// Ensure $regs is unchanged +var_dump($regs); + +echo "Done"; +?> +--EXPECTF-- +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d +bool(false) +string(8) "original" +Done |