echo "Done\n";
?>
--EXPECTF--
-int(8191)
-int(8191)
-int(6143)
+int(16383)
+int(16383)
+int(14335)
Done
echo "Done\n";
?>
--EXPECT--
-int(6143)
+int(14335)
Done
echo "Done\n";
?>
--EXPECT--
-int(8191)
+int(16383)
Done
?>
--EXPECTF--
Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
Done
?>
--EXPECTF--
Notice: Undefined variable: undef in %s on line %d
-int(8191)
+int(16383)
Done
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
echo "Done\n";
?>
--EXPECTF--
-int(6143)
+int(14335)
Done
echo "Done\n";
?>
--EXPECTF--
-int(6143)
+int(14335)
Done
?>
--EXPECTF--
Notice: Undefined variable: undef3 in %s on line %d
-int(8191)
+int(16383)
Done
Notice: Undefined variable: blah in %s on line %d
Notice: Undefined variable: undef2 in %s on line %d
-int(8191)
+int(16383)
Done
echo "Done\n";
?>
--EXPECTF--
-int(6143)
-int(6135)
+int(14335)
+int(14327)
Done
--TEST--
is_a() and is_subclass_of() shouldn't call __autoload
--INI--
-error_reporting=4095
+error_reporting=14335
--FILE--
<?php
function __autoload($name) {
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)
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);
}
case E_ERROR:
case E_NOTICE:
case E_STRICT:
+ case E_DEPRECATED:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
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)
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);
}
/* }}} */
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;
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);
#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 */
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);
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); }
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);
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);
}
/* 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) {
/* 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);
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.");
}
}
/* }}} */
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;
}
/* Load extension */
if (php_load_extension(filename, type, start_now TSRMLS_CC) == FAILURE) {
- RETVAL_FALSE;
+ RETVAL_FALSE;
} else {
RETVAL_TRUE;
}
{
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;
}
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);
--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
/* 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:
case E_STRICT:
error_type_str = "Strict Standards";
break;
+ case E_DEPRECATED:
+ error_type_str = "Deprecated";
+ break;
default:
error_type_str = "Unknown error";
break;
--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";
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) {
--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";
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()
--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 {
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"
--TEST--
Bug #22510 (segfault among complex references)
--INI--
-error_reporting=4095
+error_reporting=E_ALL | E_DEPRECATED
--FILE--
<?php
class foo
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