summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/tests/bug33771.phpt6
-rw-r--r--Zend/tests/error_reporting01.phpt2
-rw-r--r--Zend/tests/error_reporting02.phpt2
-rw-r--r--Zend/tests/error_reporting03.phpt2
-rw-r--r--Zend/tests/error_reporting04.phpt2
-rw-r--r--Zend/tests/error_reporting05.phpt2
-rw-r--r--Zend/tests/error_reporting06.phpt2
-rw-r--r--Zend/tests/error_reporting07.phpt2
-rw-r--r--Zend/tests/error_reporting08.phpt2
-rw-r--r--Zend/tests/error_reporting09.phpt2
-rw-r--r--Zend/tests/error_reporting10.phpt4
-rwxr-xr-xZend/tests/is_a.phpt10
-rw-r--r--Zend/zend.c3
-rw-r--r--Zend/zend_builtin_functions.c3
-rw-r--r--Zend/zend_compile.c4
-rw-r--r--Zend/zend_constants.c1
-rw-r--r--Zend/zend_errors.h3
-rw-r--r--Zend/zend_execute_API.c2
-rw-r--r--Zend/zend_language_parser.y2
-rw-r--r--Zend/zend_vm_def.h2
-rw-r--r--Zend/zend_vm_execute.h2
-rw-r--r--ext/date/php_date.c2
-rw-r--r--ext/mysql/php_mysql.c4
-rw-r--r--ext/standard/dl.c14
-rw-r--r--ext/standard/file.c1
-rw-r--r--ext/standard/string.c2
-rw-r--r--ext/standard/tests/serialize/bug31402.phpt2
-rw-r--r--main/main.c4
-rw-r--r--tests/classes/new_001.phpt4
-rw-r--r--tests/lang/bug20175.phpt4
-rw-r--r--tests/lang/bug22231.phpt4
-rw-r--r--tests/lang/bug22510.phpt4
32 files changed, 63 insertions, 42 deletions
diff --git a/Zend/tests/bug33771.phpt b/Zend/tests/bug33771.phpt
index a786e58066..5d6f5ca96d 100644
--- a/Zend/tests/bug33771.phpt
+++ b/Zend/tests/bug33771.phpt
@@ -34,7 +34,7 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(8191)
-int(8191)
-int(6143)
+int(16383)
+int(16383)
+int(14335)
Done
diff --git a/Zend/tests/error_reporting01.phpt b/Zend/tests/error_reporting01.phpt
index 41b509950d..da094ae759 100644
--- a/Zend/tests/error_reporting01.phpt
+++ b/Zend/tests/error_reporting01.phpt
@@ -22,5 +22,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECT--
-int(6143)
+int(14335)
Done
diff --git a/Zend/tests/error_reporting02.phpt b/Zend/tests/error_reporting02.phpt
index 227d8c6f26..252700c098 100644
--- a/Zend/tests/error_reporting02.phpt
+++ b/Zend/tests/error_reporting02.phpt
@@ -23,5 +23,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECT--
-int(8191)
+int(16383)
Done
diff --git a/Zend/tests/error_reporting03.phpt b/Zend/tests/error_reporting03.phpt
index fa88699acb..44c0d2f2d5 100644
--- a/Zend/tests/error_reporting03.phpt
+++ b/Zend/tests/error_reporting03.phpt
@@ -33,5 +33,5 @@ echo "Done\n";
?>
--EXPECTF--
Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
Done
diff --git a/Zend/tests/error_reporting04.phpt b/Zend/tests/error_reporting04.phpt
index 1d7d678b23..21707d356b 100644
--- a/Zend/tests/error_reporting04.phpt
+++ b/Zend/tests/error_reporting04.phpt
@@ -19,5 +19,5 @@ echo "Done\n";
?>
--EXPECTF--
Notice: Undefined variable: undef in %s on line %d
-int(8191)
+int(16383)
Done
diff --git a/Zend/tests/error_reporting05.phpt b/Zend/tests/error_reporting05.phpt
index fbb359b01f..2da496361e 100644
--- a/Zend/tests/error_reporting05.phpt
+++ b/Zend/tests/error_reporting05.phpt
@@ -30,5 +30,5 @@ echo "Done\n";
Notice: Undefined variable: undef_value in %s on line %d
Notice: Undefined variable: undef_name in %s on line %d
-int(6143)
+int(14335)
Done
diff --git a/Zend/tests/error_reporting06.phpt b/Zend/tests/error_reporting06.phpt
index 797f8579d4..0b2f5e5789 100644
--- a/Zend/tests/error_reporting06.phpt
+++ b/Zend/tests/error_reporting06.phpt
@@ -26,5 +26,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(6143)
+int(14335)
Done
diff --git a/Zend/tests/error_reporting07.phpt b/Zend/tests/error_reporting07.phpt
index 85c20f10ca..fb7c2115f6 100644
--- a/Zend/tests/error_reporting07.phpt
+++ b/Zend/tests/error_reporting07.phpt
@@ -26,5 +26,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(6143)
+int(14335)
Done
diff --git a/Zend/tests/error_reporting08.phpt b/Zend/tests/error_reporting08.phpt
index 362aa37650..9018e7ca1c 100644
--- a/Zend/tests/error_reporting08.phpt
+++ b/Zend/tests/error_reporting08.phpt
@@ -28,5 +28,5 @@ echo "Done\n";
?>
--EXPECTF--
Notice: Undefined variable: undef3 in %s on line %d
-int(8191)
+int(16383)
Done
diff --git a/Zend/tests/error_reporting09.phpt b/Zend/tests/error_reporting09.phpt
index 193758148c..76cff2c1da 100644
--- a/Zend/tests/error_reporting09.phpt
+++ b/Zend/tests/error_reporting09.phpt
@@ -27,5 +27,5 @@ echo "Done\n";
Notice: Undefined variable: blah in %s on line %d
Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
Done
diff --git a/Zend/tests/error_reporting10.phpt b/Zend/tests/error_reporting10.phpt
index 94fa66678c..7afda000d2 100644
--- a/Zend/tests/error_reporting10.phpt
+++ b/Zend/tests/error_reporting10.phpt
@@ -30,6 +30,6 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(6143)
-int(6135)
+int(14335)
+int(14327)
Done
diff --git a/Zend/tests/is_a.phpt b/Zend/tests/is_a.phpt
index f24a6aadb3..fd52b5a65a 100755
--- a/Zend/tests/is_a.phpt
+++ b/Zend/tests/is_a.phpt
@@ -1,7 +1,7 @@
--TEST--
is_a() and is_subclass_of() shouldn't call __autoload
--INI--
-error_reporting=4095
+error_reporting=14335
--FILE--
<?php
function __autoload($name) {
@@ -31,16 +31,16 @@ var_dump(is_subclass_of($a, "INT"));
var_dump(is_subclass_of("X1", "X2"));
?>
--EXPECTF--
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 17
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 17
bool(false)
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 18
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 18
bool(true)
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 19
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 19
bool(true)
-Strict Standards: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 20
+Deprecated: is_a(): Deprecated. Please use the instanceof operator in %sis_a.php on line 20
bool(true)
bool(false)
bool(false)
diff --git a/Zend/zend.c b/Zend/zend.c
index 0ff6373473..75b36fc3fc 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -74,7 +74,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 & ~E_STRICT;
+ EG(error_reporting) = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED;
} else {
EG(error_reporting) = atoi(new_value);
}
@@ -1481,6 +1481,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
case E_ERROR:
case E_NOTICE:
case E_STRICT:
+ case E_DEPRECATED:
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 4c9f37185b..0967a89d91 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -124,7 +124,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_included_files, NULL)
ZEND_FALIAS(get_required_files, get_included_files, NULL)
ZEND_FE(is_subclass_of, NULL)
- ZEND_FE(is_a, NULL)
+ ZEND_DEP_FE(is_a, NULL)
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
ZEND_FE(get_class_methods, NULL)
@@ -740,7 +740,6 @@ 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_compile.c b/Zend/zend_compile.c
index db4f883713..09cfd4494a 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2032,13 +2032,13 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) /* {{
function_ptr->common.function_name.v &&
function_ptr->common.type == ZEND_USER_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
- zend_error(E_STRICT,
+ zend_error(E_DEPRECATED,
"Call-time pass-by-reference has been deprecated; "
"if you would like to pass argument by reference, modify the declaration of %R().",
UG(unicode)?IS_UNICODE:IS_STRING,
function_ptr->common.function_name.v);
} else{
- zend_error(E_STRICT,
+ zend_error(E_DEPRECATED,
"Call-time pass-by-reference has been deprecated");
}
send_by_reference = 1;
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 929ea3afda..4ff098d431 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -104,6 +104,7 @@ void zend_register_standard_constants(TSRMLS_D) /* {{{ */
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_DEPRECATED", E_DEPRECATED, 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 c5f83fc730..5dbf0ad6c1 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -35,8 +35,9 @@
#define E_USER_NOTICE (1<<10L)
#define E_STRICT (1<<11L)
#define E_RECOVERABLE_ERROR (1<<12L)
+#define E_DEPRECATED (1<<13L)
-#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 | E_STRICT | E_RECOVERABLE_ERROR)
+#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 | E_STRICT | E_RECOVERABLE_ERROR | E_DEPRECATED)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index b77e7fdda1..263f03767c 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1033,7 +1033,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
}
if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
- zend_error(E_STRICT, "Function %v%s%v() is deprecated",
+ zend_error(E_DEPRECATED, "Function %v%s%v() is deprecated",
EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : EMPTY_ZSTR,
EX(function_state).function->common.scope ? "::" : "",
EX(function_state).function->common.function_name);
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 959797c2b1..ea7640edef 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -570,7 +570,7 @@ expr_without_variable:
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
- | variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
+ | variable '=' '&' T_NEW class_name_reference { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
| T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); $$.u.EA.type = ZEND_PARSED_NEW; }
| T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
| variable T_PLUS_EQUAL expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 02f46bb61d..974a956a7a 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2129,7 +2129,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
- zend_error(E_STRICT, "Function %v%s%v() is deprecated",
+ zend_error(E_DEPRECATED, "Function %v%s%v() is deprecated",
EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : EMPTY_ZSTR,
EX(function_state).function->common.scope ? "::" : "",
EX(function_state).function->common.function_name);
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index db6db39f63..684c77c19c 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -141,7 +141,7 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
- zend_error(E_STRICT, "Function %v%s%v() is deprecated",
+ zend_error(E_DEPRECATED, "Function %v%s%v() is deprecated",
EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : EMPTY_ZSTR,
EX(function_state).function->common.scope ? "::" : "",
EX(function_state).function->common.function_name);
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 2323517c13..eba64e3a44 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1360,7 +1360,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
}
/* Support for the deprecated is_dst parameter */
if (dst != -1) {
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "The is_dst parameter is deprecated");
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The is_dst parameter is deprecated");
if (gmt) {
/* GMT never uses DST */
if (dst == 1) {
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 31d645effc..da4c6fd610 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1486,7 +1486,7 @@ PHP_FUNCTION(mysql_db_query)
/* FIXME: Unicode support??? */
if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C).s, "mysql")) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated; use mysql_query() instead");
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "use mysql_query() instead");
}
php_mysql_do_query_general(query, &mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC);
@@ -1772,7 +1772,7 @@ PHP_FUNCTION(mysql_escape_string)
RETVAL_UTF8_STRINGL(new_str, new_str_len, ZSTR_DUPLICATE);
efree(new_str);
if (MySG(trace_mode)){
- php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_WARNING, "This function is deprecated; use mysql_real_escape_string() instead.");
+ php_error_docref("function.mysql-real-escape-string" TSRMLS_CC, E_DEPRECATED, "use mysql_real_escape_string() instead.");
}
}
/* }}} */
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index 0d3b499be1..7d5d4b7926 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -65,6 +65,18 @@ PHP_FUNCTION(dl)
RETURN_FALSE;
}
+ if ((strncmp(sapi_module.name, "cgi", 3) != 0) &&
+ (strcmp(sapi_module.name, "cli") != 0) &&
+ (strncmp(sapi_module.name, "embed", 5) != 0)
+ ) {
+#ifdef ZTS
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", Z_STRVAL_P(filename));
+ RETURN_FALSE;
+#else
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "dl() is deprecated - use extension=%s in your php.ini", Z_STRVAL_P(filename));
+#endif
+ }
+
php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
EG(full_tables_cleanup) = 1;
}
@@ -242,7 +254,7 @@ PHPAPI void php_dl(zval *file, int type, zval *return_value, int start_now TSRML
/* Load extension */
if (php_load_extension(filename, type, start_now TSRMLS_CC) == FAILURE) {
- RETVAL_FALSE;
+ RETVAL_FALSE;
} else {
RETVAL_TRUE;
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index dfd5988193..b546ac2b02 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1493,6 +1493,7 @@ PHPAPI int php_mkdir_ex(char *dir, long mode, int options TSRMLS_DC)
{
int ret;
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use php_stream_mkdir() instead.");
if (php_check_open_basedir(dir TSRMLS_CC)) {
return -1;
}
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 43fe859b5f..1d755bc530 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -6158,7 +6158,7 @@ PHP_FUNCTION(setlocale)
cat = Z_LVAL_PP(pcategory);
} else { /* FIXME: The following behaviour should be removed. */
char *category;
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passing locale category name as string is deprecated. Use the LC_* -constants instead");
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Passing locale category name as string is deprecated. Use the LC_* -constants instead");
convert_to_string_ex(pcategory);
category = Z_STRVAL_P(*pcategory);
diff --git a/ext/standard/tests/serialize/bug31402.phpt b/ext/standard/tests/serialize/bug31402.phpt
index 9761cb77e8..21c386b57a 100644
--- a/ext/standard/tests/serialize/bug31402.phpt
+++ b/ext/standard/tests/serialize/bug31402.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #31402 (unserialize() generates references when it should not)
--INI--
-error_reporting=E_ALL&~E_STRICT
+error_reporting=E_ALL&~E_STRICT&~E_DEPRECATED
--FILE--
<?php
diff --git a/main/main.c b/main/main.c
index ce6b281692..1abb8d0993 100644
--- a/main/main.c
+++ b/main/main.c
@@ -944,6 +944,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
/* fatal errors are real errors and cannot be made exceptions */
break;
case E_STRICT:
+ case E_DEPRECATED:
/* for the sake of BC to old damaged code */
break;
case E_NOTICE:
@@ -993,6 +994,9 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
case E_STRICT:
error_type_str = "Strict Standards";
break;
+ case E_DEPRECATED:
+ error_type_str = "Deprecated";
+ break;
default:
error_type_str = "Unknown error";
break;
diff --git a/tests/classes/new_001.phpt b/tests/classes/new_001.phpt
index 178dbd31aa..03c64e8eda 100644
--- a/tests/classes/new_001.phpt
+++ b/tests/classes/new_001.phpt
@@ -1,5 +1,7 @@
--TEST--
Confirm difference between assigning new directly and by reference.
+--INI--
+error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
echo "Compile-time strict error message should precede this.\n";
@@ -27,7 +29,7 @@ Confirm difference between assigning new directly and by reference.
var_dump($f);
?>
--EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line 23
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line 23
Compile-time strict error message should precede this.
$f initially points to the first object:
object(Inc)#%d (1) {
diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt
index 86cac271fa..7c6ec780ed 100644
--- a/tests/lang/bug20175.phpt
+++ b/tests/lang/bug20175.phpt
@@ -3,7 +3,7 @@ Bug #20175 (Static vars can't store ref to new instance)
--SKIPIF--
<?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip ZE1 does not have static class members'); ?>
--INI--
-error_reporting=4095
+error_reporting=E_ALL | E_STRICT | E_DEPRECATED
--FILE--
<?php
print zend_version()."\n";
@@ -139,7 +139,7 @@ $oop_tester = new oop_test; // repeated.
print $oop_tester->oop_static()."\n";
?>
--EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s.php on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line %d
%s
foo_static()
foo_global()
diff --git a/tests/lang/bug22231.phpt b/tests/lang/bug22231.phpt
index 4e225afc9e..4ab619395a 100644
--- a/tests/lang/bug22231.phpt
+++ b/tests/lang/bug22231.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #22231 (segfault when returning a global variable by reference)
--INI--
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
class foo {
@@ -27,7 +27,7 @@ $foo = &foo();
var_dump($foo->fubar);
?>
--EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
object(foo)#%d (1) {
["fubar"]=>
string(5) "fubar"
diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt
index 450bbb577d..fd717147d7 100644
--- a/tests/lang/bug22510.phpt
+++ b/tests/lang/bug22510.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #22510 (segfault among complex references)
--INI--
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
class foo
@@ -91,7 +91,7 @@ $bar->instance->finalize();
print "I'm alive!\n";
?>
--EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
+Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
ok1
bar::run1
foo::method1