diff options
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 397a043a5b..91bf0ee7b0 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -727,6 +727,11 @@ ZEND_FUNCTION(each) return; } + if (!EG(each_deprecation_thrown)) { + zend_error(E_DEPRECATED, "The each() function is deprecated. This message will be suppressed on further calls"); + EG(each_deprecation_thrown) = 1; + } + target_hash = HASH_OF(array); if (!target_hash) { zend_error(E_WARNING,"Variable passed to each() is not an array or object"); |
