. Added __DIR__ constant. (Lars Strojny)
. Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre)
- . Added new error mode E_DEPRECATED which is used to inform about stuff to be
- dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
+ . Added new error modes E_USER_DEPRECATED and E_DEPRECATED which is used to inform
+ about stuff to be dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
. Added "request_order" INI variable to control specifically $_REQUEST behavior.
(Stas)
. Added support for exception linking. (Marcus)
var_dump(trigger_error("error", -1));
var_dump(trigger_error("error", 0));
var_dump(trigger_error("error", E_USER_WARNING));
+var_dump(trigger_error("error", E_USER_DEPRECATED));
echo "Done\n";
?>
Warning: error in %s on line %d
bool(true)
+
+Deprecated: error in %s on line %d
+bool(true)
Done
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
+ case E_USER_DEPRECATED:
case E_RECOVERABLE_ERROR:
if (zend_is_compiling(TSRMLS_C)) {
error_filename = zend_get_compiled_filename(TSRMLS_C);
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
+ case E_USER_DEPRECATED:
break;
default:
zend_error(E_WARNING, "Invalid error type specified");
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
#define E_STRICT (1<<11L)
#define E_RECOVERABLE_ERROR (1<<12L)
#define E_DEPRECATED (1<<13L)
+#define E_USER_DEPRECATED (1<<14L)
-#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_RECOVERABLE_ERROR | E_DEPRECATED)
+#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_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
break;
case E_STRICT:
case E_DEPRECATED:
+ case E_USER_DEPRECATED:
/* for the sake of BC to old damaged code */
break;
case E_NOTICE:
error_type_str = "Strict Standards";
break;
case E_DEPRECATED:
+ case E_USER_DEPRECATED:
error_type_str = "Deprecated";
break;
default:
; E_USER_NOTICE - user-generated notice message
; E_DEPRECATED - warn about code that will not work in future versions
; of PHP
+; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Examples:
;
; E_USER_NOTICE - user-generated notice message
; E_DEPRECATED - warn about code that will not work in future versions
; of PHP
+; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Examples:
;
'safe_mode=0',
'disable_functions=',
'output_buffering=Off',
- 'error_reporting=16383',
+ 'error_reporting=30719',
'display_errors=1',
'display_startup_errors=1',
'log_errors=0',