summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend.c3
-rw-r--r--Zend/zend_builtin_functions.c1
-rw-r--r--Zend/zend_constants.c1
-rw-r--r--Zend/zend_errors.h3
-rw-r--r--Zend/zend_language_parser.y2
5 files changed, 7 insertions, 3 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index fe0070d4aa..e8f0553c22 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -65,7 +65,7 @@ static int (*zend_get_configuration_directive_p)(char *name, uint name_length, z
static ZEND_INI_MH(OnUpdateErrorReporting)
{
if (!new_value) {
- EG(error_reporting) = E_ALL & ~E_NOTICE;
+ EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_STRICT;
} else {
EG(error_reporting) = atoi(new_value);
}
@@ -863,6 +863,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
+ case E_STRICT:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index d4839a7168..252ebf4ed2 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -648,6 +648,7 @@ ZEND_FUNCTION(is_subclass_of)
Returns true if the object is of this class or has this class as one of its parents */
ZEND_FUNCTION(is_a)
{
+ zend_error(E_STRICT, "is_a(): Deprecated. Please use the instanceof operator");
is_a_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 2db90d3530..137e82f99c 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -97,6 +97,7 @@ void zend_register_standard_constants(TSRMLS_D)
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("E_STRICT", E_STRICT, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h
index 69e2cf2793..ebb3b535a0 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -33,8 +33,9 @@
#define E_USER_ERROR (1<<8L)
#define E_USER_WARNING (1<<9L)
#define E_USER_NOTICE (1<<10L)
+#define E_STRICT (1<<11L)
-#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
+#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_STRICT | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index a4dd357a01..180eb23130 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -465,7 +465,7 @@ method_body:
variable_modifiers:
non_empty_member_modifiers { $$ = $1; }
- | T_VAR { $$.u.constant.value.lval = ZEND_ACC_PUBLIC; }
+ | T_VAR { zend_error(E_STRICT, "var: Deprecated. Please use the public/private/protected modifiers"); $$.u.constant.value.lval = ZEND_ACC_PUBLIC; }
;
method_modifiers: