summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-05-26 14:10:57 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-07-10 21:05:28 +0200
commitd30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1 (patch)
tree33fdeac65ef66eb3db6066af396763fae391bef9 /ext
parent2ad75ba78440eeffbde35a12c666d5f55aaf631a (diff)
downloadphp-git-d30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1.tar.gz
Review the usage of apostrophes in error messages
Closes GH-5590
Diffstat (limited to 'ext')
-rw-r--r--ext/bz2/bz2.c2
-rw-r--r--ext/bz2/tests/001.phpt6
-rw-r--r--ext/dba/dba.c2
-rw-r--r--ext/dba/tests/dba013.phpt2
-rw-r--r--ext/dba/tests/dba014.phpt2
-rw-r--r--ext/dom/document.c2
-rw-r--r--ext/dom/tests/bug47430.phpt4
-rw-r--r--ext/dom/tests/bug67949.phpt4
-rw-r--r--ext/ffi/ffi.c92
-rw-r--r--ext/ffi/tests/003.phpt4
-rw-r--r--ext/ffi/tests/004.phpt4
-rw-r--r--ext/ffi/tests/013.phpt4
-rw-r--r--ext/ffi/tests/015.phpt4
-rw-r--r--ext/ffi/tests/016.phpt2
-rw-r--r--ext/ffi/tests/017.phpt2
-rw-r--r--ext/ffi/tests/018.phpt2
-rw-r--r--ext/ffi/tests/027.phpt10
-rw-r--r--ext/ffi/tests/043.phpt2
-rw-r--r--ext/gd/gd.c20
-rw-r--r--ext/hash/tests/new-context.phpt2
-rw-r--r--ext/intl/tests/breakiter___construct.phpt2
-rw-r--r--ext/ldap/ldap.c2
-rw-r--r--ext/ldap/tests/ldap_set_option_error.phpt2
-rw-r--r--ext/libxml/tests/bug61367-read.phpt4
-rw-r--r--ext/mbstring/mbstring.c2
-rw-r--r--ext/mbstring/tests/mb_substitute_character.phpt2
-rw-r--r--ext/mbstring/tests/mb_substitute_character_basic.phpt2
-rw-r--r--ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt12
-rw-r--r--ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt18
-rw-r--r--ext/mysqli/mysqli.c2
-rw-r--r--ext/mysqli/tests/bug38003.phpt2
-rw-r--r--ext/mysqli/tests/bug74968.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt2
-rw-r--r--ext/opcache/jit/zend_jit_helpers.c20
-rw-r--r--ext/opcache/jit/zend_jit_vm_helpers.c2
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc18
-rw-r--r--ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt4
-rw-r--r--ext/opcache/tests/bug66251.phpt2
-rw-r--r--ext/opcache/tests/bug78014.phpt2
-rw-r--r--ext/opcache/tests/bug78937_3.phpt2
-rw-r--r--ext/opcache/tests/bug78937_6.phpt2
-rw-r--r--ext/opcache/tests/invalid_new_dce.phpt2
-rw-r--r--ext/opcache/tests/jit/fetch_dim_r_003.phpt4
-rw-r--r--ext/opcache/tests/jit/fetch_dim_r_004.phpt4
-rw-r--r--ext/opcache/tests/jit/fetch_dim_rw_001.phpt4
-rw-r--r--ext/opcache/tests/jit/fetch_obj_001.phpt6
-rw-r--r--ext/opcache/tests/optimize_static_001.phpt4
-rw-r--r--ext/opcache/tests/preload_004.phpt2
-rw-r--r--ext/opcache/tests/preload_009.phpt2
-rw-r--r--ext/opcache/tests/preload_loadable_classes_2.phpt2
-rw-r--r--ext/pdo/tests/bug_47769.phpt2
-rw-r--r--ext/pdo_mysql/tests/bug44327.phpt2
-rw-r--r--ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt8
-rw-r--r--ext/phar/tests/phar_oo_006.phpt2
-rw-r--r--ext/readline/tests/bug77812-libedit.phpt2
-rw-r--r--ext/readline/tests/bug77812-readline.phpt2
-rw-r--r--ext/reflection/php_reflection.c55
-rw-r--r--ext/reflection/tests/007.phpt3
-rw-r--r--ext/reflection/tests/008.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClassConstant_basic1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_constructor_002.phpt10
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethod_001.phpt12
-rw-r--r--ext/reflection/tests/ReflectionClass_getMethod_002.phpt8
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_001.phpt26
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_002.phpt8
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_003.phpt38
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_004.phpt38
-rw-r--r--ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt2
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error1.phpt6
-rw-r--r--ext/reflection/tests/ReflectionMethod_constructor_error2.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt2
-rw-r--r--ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_constructor_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_getValue_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_isInitialized.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_setAccessible.phpt14
-rw-r--r--ext/reflection/tests/ReflectionProperty_setValue_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionReference_errors.phpt2
-rw-r--r--ext/reflection/tests/ReflectionZendExtension_error.phpt2
-rw-r--r--ext/reflection/tests/bug37816.phpt2
-rw-r--r--ext/reflection/tests/bug49719.phpt2
-rw-r--r--ext/reflection/tests/bug74673.phpt2
-rw-r--r--ext/reflection/tests/parameters_002.phpt4
-rw-r--r--ext/session/tests/bug24592.phpt4
-rw-r--r--ext/soap/tests/bugs/bug54911.phpt2
-rw-r--r--ext/spl/spl_array.c22
-rw-r--r--ext/spl/spl_directory.c2
-rw-r--r--ext/spl/spl_iterators.c2
-rw-r--r--ext/spl/tests/SplFileInfo_setFileClass_error.phpt2
-rw-r--r--ext/spl/tests/SplFileInfo_setInfoClass_error.phpt2
-rw-r--r--ext/spl/tests/arrayObject___construct_basic2.phpt4
-rw-r--r--ext/spl/tests/arrayObject___construct_basic3.phpt4
-rw-r--r--ext/spl/tests/arrayObject___construct_basic4.phpt10
-rw-r--r--ext/spl/tests/arrayObject___construct_basic5.phpt10
-rw-r--r--ext/spl/tests/arrayObject___construct_error1.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods1.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods3.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods4.phpt4
-rw-r--r--ext/spl/tests/arrayObject_magicMethods6.phpt4
-rw-r--r--ext/spl/tests/arrayObject_setFlags_basic1.phpt4
-rw-r--r--ext/spl/tests/arrayObject_setIteratorClass_error1.phpt8
-rw-r--r--ext/spl/tests/array_001.phpt8
-rw-r--r--ext/spl/tests/array_010.phpt8
-rw-r--r--ext/spl/tests/bug38325.phpt2
-rw-r--r--ext/spl/tests/bug45622.phpt2
-rw-r--r--ext/spl/tests/bug45622b.phpt4
-rw-r--r--ext/spl/tests/bug48023.phpt2
-rw-r--r--ext/spl/tests/bug54323.phpt2
-rw-r--r--ext/spl/tests/bug62978.phpt12
-rw-r--r--ext/spl/tests/bug66834.phpt2
-rw-r--r--ext/spl/tests/bug70852.phpt4
-rw-r--r--ext/spl/tests/bug71204.phpt2
-rw-r--r--ext/spl/tests/bug73423.phpt4
-rw-r--r--ext/spl/tests/bug73896.phpt2
-rw-r--r--ext/spl/tests/bug74669.phpt2
-rw-r--r--ext/spl/tests/iterator_044.phpt16
-rw-r--r--ext/spl/tests/spl_004.phpt2
-rw-r--r--ext/spl/tests/spl_autoload_001.phpt2
-rw-r--r--ext/spl/tests/spl_autoload_007.phpt6
-rwxr-xr-xext/standard/basic_functions.c2
-rw-r--r--ext/standard/formatted_print.c2
-rw-r--r--ext/standard/tests/array/array_diff_ukey_variation10.phpt4
-rw-r--r--ext/standard/tests/array/array_filter_variation9.phpt4
-rw-r--r--ext/standard/tests/array/array_intersect_ukey_variation8.phpt4
-rw-r--r--ext/standard/tests/array/array_map_object2.phpt4
-rw-r--r--ext/standard/tests/array/array_map_object3.phpt4
-rw-r--r--ext/standard/tests/array/array_map_variation12.phpt2
-rw-r--r--ext/standard/tests/array/array_map_variation14.phpt2
-rw-r--r--ext/standard/tests/array/array_map_variation15.phpt2
-rw-r--r--ext/standard/tests/array/array_map_variation16.phpt16
-rw-r--r--ext/standard/tests/array/array_map_variation17.phpt4
-rw-r--r--ext/standard/tests/array/array_walk_recursive_variation8.phpt2
-rw-r--r--ext/standard/tests/array/array_walk_variation8.phpt2
-rw-r--r--ext/standard/tests/filters/object_init_failure.phpt2
-rw-r--r--ext/standard/tests/filters/object_init_failure_2.phpt2
-rw-r--r--ext/standard/tests/general_functions/bug72920.phpt2
-rw-r--r--ext/standard/tests/general_functions/callbacks_001.phpt2
-rw-r--r--ext/standard/tests/general_functions/callbacks_002.phpt2
-rw-r--r--ext/standard/tests/general_functions/register_tick_function_error.phpt2
-rw-r--r--ext/standard/tests/serialize/max_depth.phpt4
-rw-r--r--ext/standard/tests/serialize/serialization_objects_002.phptbin7147 -> 7152 bytes
-rw-r--r--ext/standard/tests/streams/bug77664.phpt2
-rw-r--r--ext/standard/tests/strings/printf.phpt2
-rw-r--r--ext/standard/tests/strings/printf_64bit.phpt2
-rw-r--r--ext/standard/tests/strings/sprintf_variation52.phpt2
-rw-r--r--ext/standard/tests/strings/vfprintf_error3.phpt2
-rw-r--r--ext/standard/user_filters.c2
-rw-r--r--ext/standard/var.c4
-rw-r--r--ext/tidy/tests/035.phpt2
-rw-r--r--ext/tokenizer/tests/PhpToken_extension_errors.phpt2
-rw-r--r--ext/zlib/tests/005.phpt4
-rw-r--r--ext/zlib/tests/006.phpt4
-rw-r--r--ext/zlib/tests/007.phpt8
-rw-r--r--ext/zlib/tests/gzcompress_error1.phpt4
-rw-r--r--ext/zlib/tests/gzdeflate_error1.phpt4
-rw-r--r--ext/zlib/tests/gzencode_error1.phpt4
-rw-r--r--ext/zlib/zlib.c6
163 files changed, 451 insertions, 453 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index e5f06f6a6e..a57d1f6e90 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -343,7 +343,7 @@ PHP_FUNCTION(bzopen)
}
if (mode_len != 1 || (mode[0] != 'r' && mode[0] != 'w')) {
- zend_argument_value_error(2, "must be either 'r' or 'w'");
+ zend_argument_value_error(2, "must be either \"r\" or \"w\"");
RETURN_THROWS();
}
diff --git a/ext/bz2/tests/001.phpt b/ext/bz2/tests/001.phpt
index 90547c6642..3e7af7450a 100644
--- a/ext/bz2/tests/001.phpt
+++ b/ext/bz2/tests/001.phpt
@@ -37,15 +37,15 @@ var_dump(bzopen($fp, "r"));
?>
--EXPECTF--
-bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
+bzopen(): Argument #2 ($mode) must be either "r" or "w"
Warning: bzopen(): Filename cannot be empty in %s on line %d
bool(false)
Warning: bzopen(): Filename cannot be empty in %s on line %d
bool(false)
-bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
-bzopen(): Argument #2 ($mode) must be either 'r' or 'w'
+bzopen(): Argument #2 ($mode) must be either "r" or "w"
+bzopen(): Argument #2 ($mode) must be either "r" or "w"
Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d
bool(false)
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 3efcacdb2c..b3c9f4eeb2 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -107,7 +107,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
size_t len;
if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) {
- zend_argument_error(NULL, 1, "must have exactly two elements: 'key' and 'name'");
+ zend_argument_error(NULL, 1, "must have exactly two elements: \"key\" and \"name\"");
return 0;
}
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), &pos);
diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt
index 1871ce9cad..c493351de1 100644
--- a/ext/dba/tests/dba013.phpt
+++ b/ext/dba/tests/dba013.phpt
@@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc');
--EXPECTF--
database handler: %s
-Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d
+Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" in %s.php:%d
Stack trace:
#0 %sdba013.php(6): dba_insert(Array, '%s', Resource id #%d)
#1 {main}
diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt
index 2b7c2b7b25..ef59f9fedc 100644
--- a/ext/dba/tests/dba014.phpt
+++ b/ext/dba/tests/dba014.phpt
@@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc');
--EXPECTF--
database handler: %s
-Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d
+Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" in %s.php:%d
Stack trace:
#0 %sdba014.php(6): dba_insert(Array, '%s', Resource id #%d)
#1 {main}
diff --git a/ext/dom/document.c b/ext/dom/document.c
index d16a085463..6ff1750137 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -2054,7 +2054,7 @@ PHP_METHOD(DOMDocument, registerNodeClass)
RETURN_TRUE;
}
- zend_argument_error(NULL, 2, "must be a class name derived from %s or null, '%s' given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name));
+ zend_argument_error(NULL, 2, "must be a class name derived from %s or null, %s given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name));
}
/* }}} */
diff --git a/ext/dom/tests/bug47430.phpt b/ext/dom/tests/bug47430.phpt
index 2d5733fe31..33aaa235e8 100644
--- a/ext/dom/tests/bug47430.phpt
+++ b/ext/dom/tests/bug47430.phpt
@@ -25,8 +25,8 @@ print_r($arr);
?>
--EXPECT--
-Attempt to assign property 'nodeValue' on null
-Attempt to assign property 'nodeValue' on null
+Attempt to assign property "nodeValue" on null
+Attempt to assign property "nodeValue" on null
Array
(
[0] => Value
diff --git a/ext/dom/tests/bug67949.phpt b/ext/dom/tests/bug67949.phpt
index f6a12b9812..529dee04be 100644
--- a/ext/dom/tests/bug67949.phpt
+++ b/ext/dom/tests/bug67949.phpt
@@ -62,7 +62,7 @@ bool(false)
testing property access
string(4) "data"
-Warning: Attempt to read property 'textContent' on null in %s on line %d
+Warning: Attempt to read property "textContent" on null in %s on line %d
NULL
testing offset not a long
array(1) {
@@ -70,7 +70,7 @@ array(1) {
string(4) "test"
}
-Warning: Attempt to read property 'textContent' on null in %s on line %d
+Warning: Attempt to read property "textContent" on null in %s on line %d
bool(false)
NULL
array(1) {
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index 22a11f692d..f2e5dae346 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -3448,7 +3448,7 @@ static void zend_ffi_throw_parser_error(const char *format, ...) /* {{{ */
static int zend_ffi_validate_vla(zend_ffi_type *type) /* {{{ */
{
if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) {
- zend_ffi_throw_parser_error("'[*]' not allowed in other than function prototype scope at line %d", FFI_G(line));
+ zend_ffi_throw_parser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line));
return FAILURE;
}
return SUCCESS;
@@ -3465,11 +3465,11 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
ZEND_HASH_FOREACH_STR_KEY_PTR(FFI_G(tags), key, tag) {
if (ZEND_FFI_TYPE(tag->type) == type) {
if (type->kind == ZEND_FFI_TYPE_ENUM) {
- zend_ffi_throw_parser_error("Incomplete 'enum %s' at line %d", ZSTR_VAL(key), FFI_G(line));
+ zend_ffi_throw_parser_error("Incomplete enum \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
} else if (type->attr & ZEND_FFI_ATTR_UNION) {
- zend_ffi_throw_parser_error("Incomplete 'union %s' at line %d", ZSTR_VAL(key), FFI_G(line));
+ zend_ffi_throw_parser_error("Incomplete union \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
} else {
- zend_ffi_throw_parser_error("Incomplete 'struct %s' at line %d", ZSTR_VAL(key), FFI_G(line));
+ zend_ffi_throw_parser_error("Incomplete struct \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
}
return FAILURE;
}
@@ -3481,7 +3481,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
ZEND_HASH_FOREACH_STR_KEY_PTR(FFI_G(symbols), key, sym) {
if (type == ZEND_FFI_TYPE(sym->type)) {
- zend_ffi_throw_parser_error("Incomplete C type '%s' at line %d", ZSTR_VAL(key), FFI_G(line));
+ zend_ffi_throw_parser_error("Incomplete C type %s at line %d", ZSTR_VAL(key), FFI_G(line));
return FAILURE;
}
} ZEND_HASH_FOREACH_END();
@@ -3489,10 +3489,10 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
zend_ffi_throw_parser_error("Incomplete type at line %d", FFI_G(line));
return FAILURE;
} else if (!allow_incomplete_array && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) {
- zend_ffi_throw_parser_error("'[]' not allowed at line %d", FFI_G(line));
+ zend_ffi_throw_parser_error("\"[]\" is not allowed at line %d", FFI_G(line));
return FAILURE;
} else if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) {
- zend_ffi_throw_parser_error("'[*]' not allowed in other than function prototype scope at line %d", FFI_G(line));
+ zend_ffi_throw_parser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line));
return FAILURE;
}
return SUCCESS;
@@ -3502,7 +3502,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo
static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */
{
if (type->kind == ZEND_FFI_TYPE_VOID) {
- zend_ffi_throw_parser_error("'void' type is not allowed at line %d", FFI_G(line));
+ zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line));
return FAILURE;
}
return zend_ffi_validate_incomplete_type(type, allow_incomplete_tag, allow_incomplete_array);
@@ -3512,7 +3512,7 @@ static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplet
static int zend_ffi_validate_var_type(zend_ffi_type *type, zend_bool allow_incomplete_array) /* {{{ */
{
if (type->kind == ZEND_FFI_TYPE_FUNC) {
- zend_ffi_throw_parser_error("'function' type is not allowed at line %d", FFI_G(line));
+ zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line));
return FAILURE;
}
return zend_ffi_validate_type(type, 0, allow_incomplete_array);
@@ -4043,7 +4043,7 @@ ZEND_METHOD(FFI, arrayType) /* {{{ */
zend_throw_error(zend_ffi_exception_ce, "Only the leftmost array can be undimensioned");
RETURN_THROWS();
} else if (type->kind == ZEND_FFI_TYPE_VOID) {
- zend_throw_error(zend_ffi_exception_ce, "Array of 'void' is not allowed");
+ zend_throw_error(zend_ffi_exception_ce, "Array of void type is not allowed");
RETURN_THROWS();
} else if (type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG) {
zend_throw_error(zend_ffi_exception_ce, "Array of incomplete type is not allowed");
@@ -4545,7 +4545,7 @@ static char *zend_ffi_parse_directives(const char *filename, char *code_pos, cha
static ZEND_COLD zend_function *zend_fake_get_constructor(zend_object *object) /* {{{ */
{
- zend_throw_error(NULL, "Instantiation of '%s' is not allowed", ZSTR_VAL(object->ce->name));
+ zend_throw_error(NULL, "Instantiation of %s is not allowed", ZSTR_VAL(object->ce->name));
return NULL;
}
/* }}} */
@@ -5281,10 +5281,10 @@ static void zend_ffi_finalize_type(zend_ffi_dcl *dcl) /* {{{ */
case ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_COMPLEX:
case ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_COMPLEX:
case ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG|ZEND_FFI_DCL_COMPLEX:
- zend_ffi_parser_error("unsupported type '_Complex' at line %d", FFI_G(line));
+ zend_ffi_parser_error("Unsupported type _Complex at line %d", FFI_G(line));
break;
default:
- zend_ffi_parser_error("unsupported type specifier combination at line %d", FFI_G(line));
+ zend_ffi_parser_error("Unsupported type specifier combination at line %d", FFI_G(line));
break;
}
dcl->flags &= ~ZEND_FFI_DCL_TYPE_SPECIFIERS;
@@ -5332,7 +5332,7 @@ void zend_ffi_resolve_typedef(const char *name, size_t name_len, zend_ffi_dcl *d
dcl->type = type;
return;
}
- zend_ffi_parser_error("undefined C type '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Undefined C type \"%.*s\" at line %d", name_len, name, FFI_G(line));
}
/* }}} */
@@ -5446,12 +5446,12 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name
}
value = val->u64;
} else {
- zend_ffi_parser_error("enumerator value '%.*s' must be an integer at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Enumerator value \"%.*s\" must be an integer at line %d", name_len, name, FFI_G(line));
return;
}
if (overflow) {
- zend_ffi_parser_error("overflow in enumeration values '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Overflow in enumeration values \"%.*s\" at line %d", name_len, name, FFI_G(line));
return;
}
@@ -5495,7 +5495,7 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name
}
sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len);
if (sym) {
- zend_ffi_parser_error("redeclaration of '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
} else {
sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent));
sym->kind = ZEND_FFI_SYM_CONST;
@@ -5597,7 +5597,7 @@ void zend_ffi_add_field(zend_ffi_dcl *struct_dcl, const char *name, size_t name_
if (!zend_hash_str_add_ptr(&struct_type->record.fields, name, name_len, field)) {
zend_ffi_type_dtor(field->type);
pefree(field, FFI_G(persistent));
- zend_ffi_parser_error("duplicate field name '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
}
}
/* }}} */
@@ -5614,7 +5614,7 @@ void zend_ffi_add_anonymous_field(zend_ffi_dcl *struct_dcl, zend_ffi_dcl *field_
field_type = ZEND_FFI_TYPE(field_dcl->type);
if (field_type->kind != ZEND_FFI_TYPE_STRUCT) {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("declaration does not declare anything at line %d", FFI_G(line));
+ zend_ffi_parser_error("Declaration does not declare anything at line %d", FFI_G(line));
return;
}
@@ -5651,7 +5651,7 @@ void zend_ffi_add_anonymous_field(zend_ffi_dcl *struct_dcl, zend_ffi_dcl *field_
if (!zend_hash_add_ptr(&struct_type->record.fields, key, new_field)) {
zend_ffi_type_dtor(new_field->type);
pefree(new_field, FFI_G(persistent));
- zend_ffi_parser_error("duplicate field name '%s' at line %d", ZSTR_VAL(key), FFI_G(line));
+ zend_ffi_parser_error("Duplicate field name \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line));
return;
}
} else {
@@ -5686,37 +5686,37 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n
if (field_type->kind < ZEND_FFI_TYPE_UINT8 || field_type->kind > ZEND_FFI_TYPE_BOOL) {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("wrong type of bit field '%.*s' at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Wrong type of bit field \"%.*s\" at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
if (bits->kind == ZEND_FFI_VAL_INT32 || bits->kind == ZEND_FFI_VAL_INT64) {
if (bits->i64 < 0) {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("negative width in bit-field '%.*s' at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Negative width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
} else if (bits->i64 == 0) {
zend_ffi_cleanup_dcl(field_dcl);
if (name) {
- zend_ffi_parser_error("zero width in bit-field '%.*s' at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Zero width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
return;
} else if (bits->i64 > field_type->size * 8) {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("width of '%.*s' exceeds its type at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Width of \"%.*s\" exceeds its type at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
} else if (bits->kind == ZEND_FFI_VAL_UINT32 || bits->kind == ZEND_FFI_VAL_UINT64) {
if (bits->u64 == 0) {
zend_ffi_cleanup_dcl(field_dcl);
if (name) {
- zend_ffi_parser_error("zero width in bit-field '%.*s' at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Zero width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
return;
} else if (bits->u64 > field_type->size * 8) {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("width of '%.*s' exceeds its type at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Width of \"%.*s\" exceeds its type at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
} else {
zend_ffi_cleanup_dcl(field_dcl);
- zend_ffi_parser_error("bit field '%.*s' width not an integer constant at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
+ zend_ffi_parser_error("Bit field \"%.*s\" width not an integer constant at line %d", name ? name_len : sizeof("<anonymous>")-1, name ? name : "<anonymous>", FFI_G(line));
}
field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent));
@@ -5764,7 +5764,7 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n
if (!zend_hash_str_add_ptr(&struct_type->record.fields, name, name_len, field)) {
zend_ffi_type_dtor(field->type);
pefree(field, FFI_G(persistent));
- zend_ffi_parser_error("duplicate field name '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line));
}
} else {
zend_hash_next_index_insert_ptr(&struct_type->record.fields, field);
@@ -5839,12 +5839,12 @@ void zend_ffi_make_array_type(zend_ffi_dcl *dcl, zend_ffi_val *len) /* {{{ */
length = len->ch;
} else {
zend_ffi_cleanup_dcl(dcl);
- zend_ffi_parser_error("unsupported array index type at line %d", FFI_G(line));
+ zend_ffi_parser_error("Unsupported array index type at line %d", FFI_G(line));
return;
}
if (length < 0) {
zend_ffi_cleanup_dcl(dcl);
- zend_ffi_parser_error("negative array index at line %d", FFI_G(line));
+ zend_ffi_parser_error("Negative array index at line %d", FFI_G(line));
return;
}
@@ -5900,7 +5900,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n
zend_ffi_cleanup_dcl(dcl);
zend_hash_destroy(args);
pefree(args, FFI_G(persistent));
- zend_ffi_parser_error("'void' type is not allowed at line %d", FFI_G(line));
+ zend_ffi_parser_error("void type is not allowed at line %d", FFI_G(line));
return;
} else {
no_args = 1;
@@ -5930,7 +5930,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n
zend_ffi_cleanup_dcl(dcl);
zend_hash_destroy(args);
pefree(args, FFI_G(persistent));
- zend_ffi_parser_error("'float'/'double' type not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line));
+ zend_ffi_parser_error("Type float/double is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line));
return;
}
} ZEND_HASH_FOREACH_END();
@@ -6100,7 +6100,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* {
}
}
}
- zend_ffi_parser_error("redeclaration of '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line));
} else {
if ((dcl->flags & ZEND_FFI_DCL_STORAGE_CLASS) == ZEND_FFI_DCL_TYPEDEF) {
if (zend_ffi_validate_vla(ZEND_FFI_TYPE(dcl->type)) != SUCCESS) {
@@ -6165,26 +6165,26 @@ void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl,
if (dcl->flags & ZEND_FFI_DCL_STRUCT) {
if (tag->kind != ZEND_FFI_TAG_STRUCT) {
- zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
return;
} else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) {
- zend_ffi_parser_error("redefinition of 'struct %.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Redefinition of \"struct %.*s\" at line %d", name_len, name, FFI_G(line));
return;
}
} else if (dcl->flags & ZEND_FFI_DCL_UNION) {
if (tag->kind != ZEND_FFI_TAG_UNION) {
- zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
return;
} else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) {
- zend_ffi_parser_error("redefinition of 'union %.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Redefinition of \"union %.*s\" at line %d", name_len, name, FFI_G(line));
return;
}
} else if (dcl->flags & ZEND_FFI_DCL_ENUM) {
if (tag->kind != ZEND_FFI_TAG_ENUM) {
- zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line));
return;
} else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) {
- zend_ffi_parser_error("redefinition of 'enum %.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Redefinition of \"enum %.*s\" at line %d", name_len, name, FFI_G(line));
return;
}
} else {
@@ -6231,7 +6231,7 @@ void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl,
void zend_ffi_set_abi(zend_ffi_dcl *dcl, uint16_t abi) /* {{{ */
{
if (dcl->abi != ZEND_FFI_ABI_DEFAULT) {
- zend_ffi_parser_error("multiple calling convention specifiers at line %d", FFI_G(line));
+ zend_ffi_parser_error("Multiple calling convention specifiers at line %d", FFI_G(line));
} else {
dcl->abi = abi;
}
@@ -6327,7 +6327,7 @@ void zend_ffi_add_attribute(zend_ffi_dcl *dcl, const char *name, size_t name_len
dcl->attr |= ZEND_FFI_ATTR_GCC_STRUCT;
break;
case attr_unsupported:
- zend_ffi_parser_error("unsupported attribute '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
break;
default:
/* ignore */
@@ -6382,7 +6382,7 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na
&& val->i64 == 3) {
zend_ffi_set_abi(dcl, ZEND_FFI_ABI_REGISTER);
} else {
- zend_ffi_parser_error("incorrect 'regparam' value at line %d", FFI_G(line));
+ zend_ffi_parser_error("Incorrect \"regparam\" value at line %d", FFI_G(line));
}
break;
case attr_aligned:
@@ -6391,7 +6391,7 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na
&& val->i64 > 0 && val->i64 <= 0x80000000 && (val->i64 & (val->i64 - 1)) == 0) {
dcl->align = val->i64;
} else {
- zend_ffi_parser_error("incorrect 'alignment' value at line %d", FFI_G(line));
+ zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
}
break;
case attr_mode:
@@ -6448,10 +6448,10 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na
}
}
}
- zend_ffi_parser_error("unsupported 'mode' value at line %d", FFI_G(line));
+ zend_ffi_parser_error("Unsupported \"mode\" value at line %d", FFI_G(line));
// TODO: ???
case attr_unsupported:
- zend_ffi_parser_error("unsupported attribute '%.*s' at line %d", name_len, name, FFI_G(line));
+ zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line));
break;
default:
/* ignore */
@@ -6467,7 +6467,7 @@ void zend_ffi_add_msvc_attribute_value(zend_ffi_dcl *dcl, const char *name, size
&& val->i64 > 0 && val->i64 <= 0x80000000 && (val->i64 & (val->i64 - 1)) == 0) {
dcl->align = val->i64;
} else {
- zend_ffi_parser_error("incorrect 'alignment' value at line %d", FFI_G(line));
+ zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line));
}
} else {
/* ignore */
diff --git a/ext/ffi/tests/003.phpt b/ext/ffi/tests/003.phpt
index efe88b31f3..c65d766757 100644
--- a/ext/ffi/tests/003.phpt
+++ b/ext/ffi/tests/003.phpt
@@ -58,6 +58,6 @@ object(FFI\CData:struct _d)#%d (1) {
["x"]=>
int(0)
}
-FFI\ParserException: Incomplete 'struct _e' at line 1
-FFI\ParserException: Incomplete 'struct _f' at line 1
+FFI\ParserException: Incomplete struct "_e" at line 1
+FFI\ParserException: Incomplete struct "_f" at line 1
ok
diff --git a/ext/ffi/tests/004.phpt b/ext/ffi/tests/004.phpt
index f5ad02098c..f4d25f8287 100644
--- a/ext/ffi/tests/004.phpt
+++ b/ext/ffi/tests/004.phpt
@@ -82,6 +82,6 @@ object(FFI\CData:int32_t[2])#%d (2) {
[1]=>
int(0)
}
-FFI\ParserException: Incomplete 'enum _e' at line 1
-FFI\ParserException: Incomplete 'enum _f' at line 1
+FFI\ParserException: Incomplete enum "_e" at line 1
+FFI\ParserException: Incomplete enum "_f" at line 1
ok
diff --git a/ext/ffi/tests/013.phpt b/ext/ffi/tests/013.phpt
index cfc1e85eb0..af0bed9d01 100644
--- a/ext/ffi/tests/013.phpt
+++ b/ext/ffi/tests/013.phpt
@@ -57,8 +57,8 @@ try {
int(1)
int(2)
int(3)
-FFI\ParserException: 'void' type is not allowed at line 1
-FFI\ParserException: 'void' type is not allowed at line 1
+FFI\ParserException: void type is not allowed at line 1
+FFI\ParserException: void type is not allowed at line 1
FFI\ParserException: Function returning array is not allowed at line 1
FFI\ParserException: Array of functions is not allowed at line 1
FFI\ParserException: Function returning function is not allowed at line 1
diff --git a/ext/ffi/tests/015.phpt b/ext/ffi/tests/015.phpt
index 7b710c1dc0..86f6a0c3b6 100644
--- a/ext/ffi/tests/015.phpt
+++ b/ext/ffi/tests/015.phpt
@@ -57,9 +57,9 @@ try {
?>
ok
--EXPECT--
-FFI\ParserException: Incomplete 'struct DIR' at line 1
+FFI\ParserException: Incomplete struct "DIR" at line 1
ok
-FFI\ParserException: Incomplete 'struct DIR' at line 1
+FFI\ParserException: Incomplete struct "DIR" at line 1
ok
ok
ok
diff --git a/ext/ffi/tests/016.phpt b/ext/ffi/tests/016.phpt
index 2ca8363fbd..b6aecf7634 100644
--- a/ext/ffi/tests/016.phpt
+++ b/ext/ffi/tests/016.phpt
@@ -27,7 +27,7 @@ try {
?>
ok
--EXPECT--
-FFI\ParserException: 'function' type is not allowed at line 1
+FFI\ParserException: function type is not allowed at line 1
FFI\ParserException: Struct/union can't contain an instance of itself at line 1
ok
ok
diff --git a/ext/ffi/tests/017.phpt b/ext/ffi/tests/017.phpt
index 02b917ff2b..be915341ea 100644
--- a/ext/ffi/tests/017.phpt
+++ b/ext/ffi/tests/017.phpt
@@ -24,7 +24,7 @@ try {
?>
ok
--EXPECTF--
-FFI\ParserException: 'function' type is not allowed at line 1
+FFI\ParserException: function type is not allowed at line 1
FFI\ParserException: Struct/union can't contain an instance of itself at line 1
object(FFI\CData:struct X)#%d (1) {
["ptr"]=>
diff --git a/ext/ffi/tests/018.phpt b/ext/ffi/tests/018.phpt
index f48367bc71..6f964f1c9b 100644
--- a/ext/ffi/tests/018.phpt
+++ b/ext/ffi/tests/018.phpt
@@ -21,6 +21,6 @@ try {
?>
ok
--EXPECT--
-FFI\ParserException: Incomplete 'struct X' at line 1
+FFI\ParserException: Incomplete struct "X" at line 1
ok
ok
diff --git a/ext/ffi/tests/027.phpt b/ext/ffi/tests/027.phpt
index cc40798478..0ac2f36788 100644
--- a/ext/ffi/tests/027.phpt
+++ b/ext/ffi/tests/027.phpt
@@ -77,13 +77,13 @@ try {
}
?>
--EXPECT--
-FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1
-FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1
-FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1
+FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1
+FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1
+FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1
ok
FFI\Exception: Cannot instantiate FFI\CData of zero size
-FFI\ParserException: '[]' not allowed at line 1
-FFI\ParserException: '[]' not allowed at line 1
+FFI\ParserException: "[]" is not allowed at line 1
+FFI\ParserException: "[]" is not allowed at line 1
ok
ok
ok
diff --git a/ext/ffi/tests/043.phpt b/ext/ffi/tests/043.phpt
index f4400a9adc..8a6c299b6e 100644
--- a/ext/ffi/tests/043.phpt
+++ b/ext/ffi/tests/043.phpt
@@ -12,7 +12,7 @@ typedef unsigned int a;
");
?>
--EXPECTF--
-Fatal error: Uncaught FFI\ParserException: redeclaration of 'a' at line 3 in %s043.php:2
+Fatal error: Uncaught FFI\ParserException: Redeclaration of "a" at line 3 in %s043.php:2
Stack trace:
#0 %s043.php(2): FFI::cdef('%s')
#1 {main}
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7d415137bd..5996579e3f 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -3488,28 +3488,28 @@ PHP_FUNCTION(imagecrop)
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") -1)) != NULL) {
rect.x = zval_get_long(tmp);
} else {
- zend_argument_value_error(2, "must have an 'x' key");
+ zend_argument_value_error(2, "must have an \"x\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
rect.y = zval_get_long(tmp);
} else {
- zend_argument_value_error(2, "must have a 'y' key");
+ zend_argument_value_error(2, "must have a \"y\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
rect.width = zval_get_long(tmp);
} else {
- zend_argument_value_error(2, "must have a 'width' key");
+ zend_argument_value_error(2, "must have a \"width\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
rect.height = zval_get_long(tmp);
} else {
- zend_argument_value_error(2, "must have a 'height' key");
+ zend_argument_value_error(2, "must have a \"height\" key");
RETURN_THROWS();
}
@@ -3672,28 +3672,28 @@ PHP_FUNCTION(imageaffine)
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") - 1)) != NULL) {
rect.x = zval_get_long(tmp);
} else {
- zend_argument_value_error(3, "must have an 'x' key");
+ zend_argument_value_error(3, "must have an \"x\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
rect.y = zval_get_long(tmp);
} else {
- zend_argument_value_error(3, "must have a 'y' key");
+ zend_argument_value_error(3, "must have a \"y\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
rect.width = zval_get_long(tmp);
} else {
- zend_argument_value_error(3, "must have a 'width' key");
+ zend_argument_value_error(3, "must have a \"width\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
rect.height = zval_get_long(tmp);
} else {
- zend_argument_value_error(3, "must have a 'height' key");
+ zend_argument_value_error(3, "must have a \"height\" key");
RETURN_THROWS();
}
pRect = &rect;
@@ -3736,14 +3736,14 @@ PHP_FUNCTION(imageaffinematrixget)
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) {
x = zval_get_double(tmp);
} else {
- zend_argument_value_error(2, "must have an 'x' key");
+ zend_argument_value_error(2, "must have an \"x\" key");
RETURN_THROWS();
}
if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "y", sizeof("y") - 1)) != NULL) {
y = zval_get_double(tmp);
} else {
- zend_argument_value_error(2, "must have a 'y' key");
+ zend_argument_value_error(2, "must have a \"y\" key");
RETURN_THROWS();
}
diff --git a/ext/hash/tests/new-context.phpt b/ext/hash/tests/new-context.phpt
index d53ff06642..c62c721acb 100644
--- a/ext/hash/tests/new-context.phpt
+++ b/ext/hash/tests/new-context.phpt
@@ -9,4 +9,4 @@ try {
echo "Exception: {$e->getMessage()}\n";
}
--EXPECT--
-Exception: Call to private HashContext::__construct() from invalid context
+Exception: Call to private HashContext::__construct() from global scope
diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt
index d957b1182d..df16ceafd0 100644
--- a/ext/intl/tests/breakiter___construct.phpt
+++ b/ext/intl/tests/breakiter___construct.phpt
@@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING);
new IntlBreakIterator();
--EXPECTF--
-Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from global scope in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 7b74fda9b2..a7e6abacfb 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -284,7 +284,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
size_t num_tmpstrings1 = 0, num_tmpstrings2 = 0;
if ((val = zend_hash_str_find(Z_ARRVAL_P(array), "oid", sizeof("oid") - 1)) == NULL) {
- php_error_docref(NULL, E_WARNING, "Control must have an oid key");
+ php_error_docref(NULL, E_WARNING, "Control must have an \"oid\" key");
return -1;
}
diff --git a/ext/ldap/tests/ldap_set_option_error.phpt b/ext/ldap/tests/ldap_set_option_error.phpt
index 079c63577d..5ef4c0b86b 100644
--- a/ext/ldap/tests/ldap_set_option_error.phpt
+++ b/ext/ldap/tests/ldap_set_option_error.phpt
@@ -33,7 +33,7 @@ var_dump(ldap_set_option($link, 999999, 999999));
--EXPECTF--
bool(false)
-Warning: ldap_set_option(): Control must have an oid key in %s on line %d
+Warning: ldap_set_option(): Control must have an "oid" key in %s on line %d
bool(false)
Warning: ldap_set_option(): The array value must contain only arrays, where each array is a control in %s on line %d
diff --git a/ext/libxml/tests/bug61367-read.phpt b/ext/libxml/tests/bug61367-read.phpt
index 2dd8ca7c21..959b404954 100644
--- a/ext/libxml/tests/bug61367-read.phpt
+++ b/ext/libxml/tests/bug61367-read.phpt
@@ -58,6 +58,6 @@ Warning: DOMDocument::loadXML(): Failure to process entity file in Entity, line:
Warning: DOMDocument::loadXML(): Entity 'file' not defined in Entity, line: 4 in %s on line %d
-Warning: Attempt to read property 'firstChild' on null in %s on line %d
+Warning: Attempt to read property "firstChild" on null in %s on line %d
-Warning: Attempt to read property 'nodeValue' on null in %s on line %d
+Warning: Attempt to read property "nodeValue" on null in %s on line %d
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 4f2533ada5..393cd44da4 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -1581,7 +1581,7 @@ PHP_FUNCTION(mb_substitute_character)
RETURN_TRUE;
}
/* Invalid string value */
- zend_argument_value_error(1, "must be 'none', 'long', 'entity' or a valid codepoint");
+ zend_argument_value_error(1, "must be \"none\", \"long\", \"entity\" or a valid codepoint");
RETURN_THROWS();
}
/* Integer codepoint passed */
diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt
index 9848624e8a..325942f26b 100644
--- a/ext/mbstring/tests/mb_substitute_character.phpt
+++ b/ext/mbstring/tests/mb_substitute_character.phpt
@@ -42,4 +42,4 @@ string(4) "82a0"
bool(true)
string(6) "entity"
string(20) "262378323636303b82a0"
-mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt
index d230dfd186..dae6304014 100644
--- a/ext/mbstring/tests/mb_substitute_character_basic.phpt
+++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt
@@ -38,4 +38,4 @@ bool(true)
string(4) "none"
bool(true)
string(4) "long"
-mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
diff --git a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt
index f601f2453d..2435318eaa 100644
--- a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt
+++ b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt
@@ -149,17 +149,17 @@ TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must b
--uppercase FALSE--
TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given
--empty string DQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--empty string SQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--string DQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--string SQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--mixed case string--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--heredoc--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--instance of classWithToString--
TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithToString given
--instance of classWithoutToString--
diff --git a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt
index e11be336ab..64298b0d66 100644
--- a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt
+++ b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt
@@ -121,9 +121,9 @@ bool(true)
--float -10.5--
ValueError: mb_substitute_character(): Argument #1 ($substitute_character) is not a valid codepoint
--float 10.0e19--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--float -10.0e19--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--float .5--
bool(true)
--empty array--
@@ -147,19 +147,19 @@ bool(true)
--uppercase FALSE--
bool(true)
--empty string DQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--empty string SQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--string DQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--string SQ--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--mixed case string--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--heredoc--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--instance of classWithToString--
-ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint
+ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint
--instance of classWithoutToString--
TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithoutToString given
--undefined var--
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 0d1c34d7fc..ba1fdf8033 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -1179,7 +1179,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
return;
}
if (UNEXPECTED(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) {
- zend_throw_error(NULL, "Class '%s' cannot be instantiated", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Class %s cannot be instantiated", ZSTR_VAL(ce->name));
RETURN_THROWS();
}
fetchtype = MYSQLI_ASSOC;
diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt
index bcfd239911..346e3f864f 100644
--- a/ext/mysqli/tests/bug38003.phpt
+++ b/ext/mysqli/tests/bug38003.phpt
@@ -17,7 +17,7 @@ $DB = new DB();
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s
+Fatal error: Uncaught Error: Call to private DB::__construct() from global scope in %s
Stack trace:
#0 {main}
thrown in %s
diff --git a/ext/mysqli/tests/bug74968.phpt b/ext/mysqli/tests/bug74968.phpt
index e3e971eb1f..c009f86451 100644
--- a/ext/mysqli/tests/bug74968.phpt
+++ b/ext/mysqli/tests/bug74968.phpt
@@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc');
?>
==DONE==
--EXPECTF--
-Fatal error: Uncaught Error: Class 'test' cannot be instantiated in %sbug74968.php:%d
+Fatal error: Uncaught Error: Class test cannot be instantiated in %sbug74968.php:%d
Stack trace:
#0 %sbug74968.php(%d): mysqli_result->fetch_object('test')
#1 {main}
diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt
index c3dde0e2f7..c97738efb5 100644
--- a/ext/mysqli/tests/mysqli_fetch_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object.phpt
@@ -147,4 +147,4 @@ NULL
mysqli_result object is already closed
[0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d
-Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
+Fatal error: Class "this_class_does_not_exist" not found in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index 564751a25b..c3eff52ed0 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -138,4 +138,4 @@ NULL
NULL
mysqli_result object is already closed
-Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
+Fatal error: Class "this_class_does_not_exist" not found in %s on line %d
diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c
index 90b78c9c24..ad26607fd6 100644
--- a/ext/opcache/jit/zend_jit_helpers.c
+++ b/ext/opcache/jit/zend_jit_helpers.c
@@ -362,13 +362,13 @@ str_index:
if (UNEXPECTED(Z_TYPE_P(retval) == IS_INDIRECT)) {
retval = Z_INDIRECT_P(retval);
if (UNEXPECTED(Z_TYPE_P(retval) == IS_UNDEF)) {
- zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
ZVAL_NULL(result);
return;
}
}
} else {
- zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
ZVAL_NULL(result);
return;
}
@@ -381,7 +381,7 @@ num_index:
return;
num_undef:
- zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval);
ZVAL_NULL(result);
}
@@ -682,7 +682,7 @@ try_string_offset:
if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
break;
}
- zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
+ zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim));
break;
case IS_UNDEF:
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
@@ -706,7 +706,7 @@ try_string_offset:
}
if (UNEXPECTED(Z_STRLEN_P(container) < ((offset < 0) ? -(size_t)offset : ((size_t)offset + 1)))) {
- zend_error(E_WARNING, "Uninitialized string offset: " ZEND_LONG_FMT, offset);
+ zend_error(E_WARNING, "Uninitialized string offset " ZEND_LONG_FMT, offset);
ZVAL_EMPTY_STRING(result);
} else {
zend_uchar c;
@@ -812,7 +812,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_obj_is_helper(zval *container, zval
static zval* ZEND_FASTCALL zend_jit_fetch_dimension_rw_long_helper(HashTable *ht, zend_long hval)
{
- zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval);
return zend_hash_index_update(ht, hval, &EG(uninitialized_zval));
}
@@ -828,7 +828,7 @@ try_again:
break;
}
if (type != BP_VAR_UNSET) {
- zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
+ zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim));
}
break;
case IS_UNDEF:
@@ -964,7 +964,7 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim,
offset = zend_check_string_offset(dim, BP_VAR_W);
if (offset < -(zend_long)Z_STRLEN_P(str)) {
/* Error on negative offset */
- zend_error(E_WARNING, "Illegal string offset: " ZEND_LONG_FMT, offset);
+ zend_error(E_WARNING, "Illegal string offset " ZEND_LONG_FMT, offset);
if (result) {
ZVAL_NULL(result);
}
@@ -1787,13 +1787,13 @@ static void ZEND_FASTCALL zend_jit_invalid_array_access(zval *container)
static void ZEND_FASTCALL zend_jit_invalid_property_read(zval *container, const char *property_name)
{
- zend_error(E_WARNING, "Attempt to read property '%s' on %s", property_name, zend_zval_type_name(container));
+ zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", property_name, zend_zval_type_name(container));
}
static void ZEND_FASTCALL zend_jit_invalid_property_write(zval *container, const char *property_name)
{
zend_throw_error(NULL,
- "Attempt to modify property '%s' on %s",
+ "Attempt to modify property \"%s\" on %s",
property_name, zend_zval_type_name(container));
}
diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c
index be6ecce0b5..755af16ede 100644
--- a/ext/opcache/jit/zend_jit_vm_helpers.c
+++ b/ext/opcache/jit/zend_jit_vm_helpers.c
@@ -255,7 +255,7 @@ static zend_always_inline int _zend_quick_get_constant(
if (!c) {
if (!check_defined_only) {
- zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
+ zend_throw_error(NULL, "Undefined constant \"%s\"", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
ZVAL_UNDEF(EX_VAR(opline->result.var));
}
CACHE_PTR(opline->extended_value, ENCODE_SPECIAL_CACHE_NUM(zend_hash_num_elements(EG(zend_constants))));
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 011d8d8b8d..c6f4a54492 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -1895,20 +1895,20 @@ static int zend_jit_undefined_offset_stub(dasm_State **Dst)
|3:
|.if X64WIN
| mov CARG1, E_NOTICE
- | LOAD_ADDR CARG2, "Undefined offset: " ZEND_LONG_FMT
+ | LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT
| mov CARG3, aword [r0]
| EXT_CALL zend_error, r0
| add r4, 0x28 // stack alignment
|.elif X64
| mov CARG1, E_NOTICE
- | LOAD_ADDR CARG2, "Undefined offset: " ZEND_LONG_FMT
+ | LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT
| mov CARG3, aword [r0]
| EXT_CALL zend_error, r0
| add r4, 8 // stack alignment
|.else
| sub r4, 4
| push aword [r0]
- | push "Undefined offset: " ZEND_LONG_FMT
+ | push "Undefined array key " ZEND_LONG_FMT
| push E_NOTICE
| EXT_CALL zend_error, r0
| add r4, 28
@@ -1963,14 +1963,14 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst)
|3:
|.if X64WIN
| mov CARG1, E_NOTICE
- | LOAD_ADDR CARG2, "Undefined index: %s"
+ | LOAD_ADDR CARG2, "Undefined array key \"%s\""
| mov CARG3, aword [r0]
| add CARG3, offsetof(zend_string, val)
| EXT_CALL zend_error, r0
| add r4, 0x28
|.elif X64
| mov CARG1, E_NOTICE
- | LOAD_ADDR CARG2, "Undefined index: %s"
+ | LOAD_ADDR CARG2, "Undefined array key \"%s\""
| mov CARG3, aword [r0]
| add CARG3, offsetof(zend_string, val)
| EXT_CALL zend_error, r0
@@ -1980,7 +1980,7 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst)
| mov r0, aword [r0]
| add r0, offsetof(zend_string, val)
| push r0
- | push "Undefined index: %s"
+ | push "Undefined array key \"%s\""
| push E_NOTICE
| EXT_CALL zend_error, r0
| add r4, 28
@@ -4944,7 +4944,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
switch (type) {
case BP_VAR_R:
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
- | // zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ | // zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval);
| // retval = &EG(uninitialized_zval);
| UNDEFINED_OFFSET opline
| jmp >9
@@ -4965,7 +4965,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
|2:
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
| SAVE_VALID_OPLINE opline, r0
- | // zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ | // zend_error(E_NOTICE,"Undefined arary offset " ZEND_LONG_FMT, hval);
| //retval = zend_hash_index_update(ht, hval, &EG(uninitialized_zval));
| EXT_CALL zend_jit_fetch_dimension_rw_long_helper, r0
}
@@ -5076,7 +5076,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
switch (type) {
case BP_VAR_R:
if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) {
- // zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key));
+ // zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
| UNDEFINED_INDEX opline
| jmp >9
} else {
diff --git a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
index 4b570baaaf..1cc55b4001 100644
--- a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
+++ b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
@@ -16,5 +16,5 @@ try {
?>
--EXPECTF--
-Notice: Undefined offset: 0 in %s on line %d
-Attempt to assign property 'y' on null
+Notice: Undefined array key 0 in %s on line %d
+Attempt to assign property "y" on null
diff --git a/ext/opcache/tests/bug66251.phpt b/ext/opcache/tests/bug66251.phpt
index 42c6e2f606..20b2a166d7 100644
--- a/ext/opcache/tests/bug66251.phpt
+++ b/ext/opcache/tests/bug66251.phpt
@@ -13,7 +13,7 @@ const A="hello";
function getA() {return A;}
?>
--EXPECTF--
-Fatal error: Uncaught Error: Undefined constant 'A' in %s:%d
+Fatal error: Uncaught Error: Undefined constant "A" in %s:%d
Stack trace:
#0 %s(%d): getA()
#1 {main}
diff --git a/ext/opcache/tests/bug78014.phpt b/ext/opcache/tests/bug78014.phpt
index 47ec05977c..3b4d332828 100644
--- a/ext/opcache/tests/bug78014.phpt
+++ b/ext/opcache/tests/bug78014.phpt
@@ -23,7 +23,7 @@ Warning: Can't preload unlinked class C: Parent with unresolved initializers B i
Warning: Can't preload class B with unresolved initializer for constant X in %s on line %d
-Fatal error: Uncaught Error: Class 'C' not found in %sbug78014.php:5
+Fatal error: Uncaught Error: Class "C" not found in %sbug78014.php:5
Stack trace:
#0 {main}
thrown in %sbug78014.php on line 5
diff --git a/ext/opcache/tests/bug78937_3.phpt b/ext/opcache/tests/bug78937_3.phpt
index 81821e3109..fe9696816c 100644
--- a/ext/opcache/tests/bug78937_3.phpt
+++ b/ext/opcache/tests/bug78937_3.phpt
@@ -20,7 +20,7 @@ Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78
Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3
-Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:3
+Fatal error: Uncaught Error: Class "Bar" not found in %spreload_bug78937.inc:3
Stack trace:
#0 %sbug78937_3.php(3): foo()
#1 {main}
diff --git a/ext/opcache/tests/bug78937_6.phpt b/ext/opcache/tests/bug78937_6.phpt
index 6e4d7060b3..019ddd7ae3 100644
--- a/ext/opcache/tests/bug78937_6.phpt
+++ b/ext/opcache/tests/bug78937_6.phpt
@@ -21,7 +21,7 @@ Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78
Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3
-Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:6
+Fatal error: Uncaught Error: Class "Bar" not found in %spreload_bug78937.inc:6
Stack trace:
#0 %sbug78937_6.php(3): bar()
#1 {main}
diff --git a/ext/opcache/tests/invalid_new_dce.phpt b/ext/opcache/tests/invalid_new_dce.phpt
index c029a49bdc..79dcf6b812 100644
--- a/ext/opcache/tests/invalid_new_dce.phpt
+++ b/ext/opcache/tests/invalid_new_dce.phpt
@@ -39,4 +39,4 @@ try { test4(); } catch (Error $e) { echo $e->getMessage(), "\n"; }
Cannot instantiate abstract class Foo
Cannot instantiate interface Bar
Cannot instantiate trait Baz
-Cannot declare self-referencing constant 'Abc::BAR'
+Cannot declare self-referencing constant Abc::BAR
diff --git a/ext/opcache/tests/jit/fetch_dim_r_003.phpt b/ext/opcache/tests/jit/fetch_dim_r_003.phpt
index 2638715236..c71b13ec12 100644
--- a/ext/opcache/tests/jit/fetch_dim_r_003.phpt
+++ b/ext/opcache/tests/jit/fetch_dim_r_003.phpt
@@ -48,10 +48,10 @@ string(1) "B"
Warning: String offset cast occurred in %s on line %d
string(1) "A"
-Warning: Illegal string offset 'ab' in %sfetch_dim_r_003.php on line 12
+Warning: Illegal string offset "ab" in %sfetch_dim_r_003.php on line 12
string(1) "A"
-Warning: Illegal string offset 'ab' in %sfetch_dim_r_003.php on line 15
+Warning: Illegal string offset "ab" in %sfetch_dim_r_003.php on line 15
string(1) "A"
Notice: A non well formed numeric value encountered in %sfetch_dim_r_003.php on line 16
diff --git a/ext/opcache/tests/jit/fetch_dim_r_004.phpt b/ext/opcache/tests/jit/fetch_dim_r_004.phpt
index 0fd705942e..b781dc2cc4 100644
--- a/ext/opcache/tests/jit/fetch_dim_r_004.phpt
+++ b/ext/opcache/tests/jit/fetch_dim_r_004.phpt
@@ -48,10 +48,10 @@ string(1) "B"
Warning: String offset cast occurred in %s on line %d
string(1) "A"
-Warning: Illegal string offset 'ab' in %sfetch_dim_r_004.php on line 4
+Warning: Illegal string offset "ab" in %sfetch_dim_r_004.php on line 4
string(1) "A"
-Warning: Illegal string offset 'ab' in %sfetch_dim_r_004.php on line 4
+Warning: Illegal string offset "ab" in %sfetch_dim_r_004.php on line 4
string(1) "A"
Notice: A non well formed numeric value encountered in %sfetch_dim_r_004.php on line 4
diff --git a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
index c5772220cb..9967896d1f 100644
--- a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
+++ b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt
@@ -18,9 +18,9 @@ var_dump(foo());
--EXPECTF--
Warning: Undefined variable $a in %s on line %d
-Notice: Undefined offset: 0 in %sfetch_dim_rw_001.php on line 3
+Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
-Notice: Undefined offset: 0 in %sfetch_dim_rw_001.php on line 3
+Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3
array(1) {
[0]=>
int(2)
diff --git a/ext/opcache/tests/jit/fetch_obj_001.phpt b/ext/opcache/tests/jit/fetch_obj_001.phpt
index 49de772b66..62631fa893 100644
--- a/ext/opcache/tests/jit/fetch_obj_001.phpt
+++ b/ext/opcache/tests/jit/fetch_obj_001.phpt
@@ -128,10 +128,10 @@ object(stdClass)#%d (2) {
array(0) {
}
}
-Attempt to modify property 'abc' on array
+Attempt to modify property "abc" on array
array(0) {
}
-Attempt to modify property 'abc' on null
+Attempt to modify property "abc" on null
NULL
-Attempt to modify property 'abc' on string
+Attempt to modify property "abc" on string
string(0) ""
diff --git a/ext/opcache/tests/optimize_static_001.phpt b/ext/opcache/tests/optimize_static_001.phpt
index aac2d71907..200c9fe920 100644
--- a/ext/opcache/tests/optimize_static_001.phpt
+++ b/ext/opcache/tests/optimize_static_001.phpt
@@ -19,5 +19,5 @@ try {
?>
OK
--EXPECT--
-Exception: Undefined constant 'UNDEFINED_CONST'
-OK \ No newline at end of file
+Exception: Undefined constant "UNDEFINED_CONST"
+OK
diff --git a/ext/opcache/tests/preload_004.phpt b/ext/opcache/tests/preload_004.phpt
index 5e36488ee8..c61a73134d 100644
--- a/ext/opcache/tests/preload_004.phpt
+++ b/ext/opcache/tests/preload_004.phpt
@@ -15,6 +15,6 @@ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows
var_dump(class_exists('Foo'));
?>
--EXPECT--
-Fatal error: Undefined class constant 'self::DOES_NOT_EXIST' in Unknown on line 0
+Fatal error: Undefined constant self::DOES_NOT_EXIST in Unknown on line 0
Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0
diff --git a/ext/opcache/tests/preload_009.phpt b/ext/opcache/tests/preload_009.phpt
index b50e921c07..c28bab88fe 100644
--- a/ext/opcache/tests/preload_009.phpt
+++ b/ext/opcache/tests/preload_009.phpt
@@ -16,6 +16,6 @@ var_dump(trait_exists('T'));
var_dump(class_exists('Foo'));
?>
--EXPECT--
-Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
+Fatal error: Undefined constant "UNDEF" in Unknown on line 0
Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0
diff --git a/ext/opcache/tests/preload_loadable_classes_2.phpt b/ext/opcache/tests/preload_loadable_classes_2.phpt
index 1c34ebc5c0..b64102a8fc 100644
--- a/ext/opcache/tests/preload_loadable_classes_2.phpt
+++ b/ext/opcache/tests/preload_loadable_classes_2.phpt
@@ -13,6 +13,6 @@ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows
--FILE--
Unreachable
--EXPECT--
-Fatal error: Undefined constant 'UNDEF' in Unknown on line 0
+Fatal error: Undefined constant "UNDEF" in Unknown on line 0
Fatal error: Failed to resolve initializers of class Test during preloading in Unknown on line 0
diff --git a/ext/pdo/tests/bug_47769.phpt b/ext/pdo/tests/bug_47769.phpt
index 1c4395cc4b..2c308d9113 100644
--- a/ext/pdo/tests/bug_47769.phpt
+++ b/ext/pdo/tests/bug_47769.phpt
@@ -34,7 +34,7 @@ this is a protected method.
this is a private method.
foo
-Fatal error: Uncaught Error: Call to protected method test::isProtected() from context '' in %s:%d
+Fatal error: Uncaught Error: Call to protected method test::isProtected() from global scope in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/pdo_mysql/tests/bug44327.phpt b/ext/pdo_mysql/tests/bug44327.phpt
index 4b0b7d9bd0..8fa0025dd6 100644
--- a/ext/pdo_mysql/tests/bug44327.phpt
+++ b/ext/pdo_mysql/tests/bug44327.phpt
@@ -60,5 +60,5 @@ object(PDORow)#%d (2) {
string(19) "SELECT id FROM test"
----------------------------------
-Warning: Attempt to read property 'queryString' on bool in %s on line %d
+Warning: Attempt to read property "queryString" on bool in %s on line %d
NULL
diff --git a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
index 4463dbb3ec..2d0dfc3e5d 100644
--- a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
+++ b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
@@ -92,12 +92,12 @@ array(2) {
string(0) ""
}
-Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function 'nothing' not found or invalid function name in %s on line %d
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "nothing" not found or invalid function name in %s on line %d
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
-Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function '' not found or invalid function name in %s on line %d
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "" not found or invalid function name in %s on line %d
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
@@ -112,7 +112,7 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or s
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
-Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'PDOStatement' does not have a method 'foo' in %s on line %d
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class PDOStatement does not have a method "foo" in %s on line %d
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
@@ -139,7 +139,7 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: non-static me
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
-Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'bar' does not have a method 'inexistent' in %s on line %d
+Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class bar does not have a method "inexistent" in %s on line %d
Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d
bool(false)
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt
index c050859b86..5aefaaaa59 100644
--- a/ext/phar/tests/phar_oo_006.phpt
+++ b/ext/phar/tests/phar_oo_006.phpt
@@ -40,7 +40,7 @@ unlink(__DIR__ . '/files/phar_oo_006.phar.php');
__halt_compiler();
?>
--EXPECTF--
-SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'SplFileInfo' given
+SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, SplFileInfo given
MyFile::__construct(phar://%s/a.php)
a.php
MyFile::__construct(phar://%s/b/c.php)
diff --git a/ext/readline/tests/bug77812-libedit.phpt b/ext/readline/tests/bug77812-libedit.phpt
index 0c68a2d5c8..a5e39f05ae 100644
--- a/ext/readline/tests/bug77812-libedit.phpt
+++ b/ext/readline/tests/bug77812-libedit.phpt
@@ -29,7 +29,7 @@ bar
xx
xxx
-Warning: Uncaught Error: Undefined constant 'FOO' in php shell code:1
+Warning: Uncaught Error: Undefined constant "FOO" in php shell code:1
Stack trace:
#0 {main}
thrown in php shell code on line 1
diff --git a/ext/readline/tests/bug77812-readline.phpt b/ext/readline/tests/bug77812-readline.phpt
index a3917ccaba..335797aa66 100644
--- a/ext/readline/tests/bug77812-readline.phpt
+++ b/ext/readline/tests/bug77812-readline.phpt
@@ -40,7 +40,7 @@ xxx
php > FOO
php > ;
-Warning: Uncaught Error: Undefined constant 'FOO' in php shell code:1
+Warning: Uncaught Error: Undefined constant "FOO" in php shell code:1
Stack trace:
#0 {main}
thrown in php shell code on line 1
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 9b8c34e4dd..c751da1281 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1167,7 +1167,7 @@ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attribut
if (name && (flags & REFLECTION_ATTRIBUTE_IS_INSTANCEOF)) {
if (NULL == (base = zend_lookup_class(name))) {
if (!EG(exception)) {
- zend_throw_error(NULL, "Class '%s' not found", ZSTR_VAL(name));
+ zend_throw_error(NULL, "Class \"%s\" not found", ZSTR_VAL(name));
}
RETURN_THROWS();
@@ -2281,7 +2281,7 @@ ZEND_METHOD(ReflectionParameter, __construct)
}
if ((ce = zend_lookup_class(name)) == NULL) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", ZSTR_VAL(name));
+ "Class \"%s\" does not exist", ZSTR_VAL(name));
zend_string_release(name);
RETURN_THROWS();
}
@@ -2513,19 +2513,19 @@ ZEND_METHOD(ReflectionParameter, getClass)
ce = param->fptr->common.scope;
if (!ce) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Parameter uses 'self' as type hint but function is not a class member!");
+ "Parameter uses \"self\" as type but function is not a class member");
RETURN_THROWS();
}
} else if (0 == zend_binary_strcasecmp(ZSTR_VAL(class_name), ZSTR_LEN(class_name), "parent", sizeof("parent")- 1)) {
ce = param->fptr->common.scope;
if (!ce) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Parameter uses 'parent' as type hint but function is not a class member!");
+ "Parameter uses \"parent\" as type but function is not a class member");
RETURN_THROWS();
}
if (!ce->parent) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Parameter uses 'parent' as type hint although class does not have a parent!");
+ "Parameter uses \"parent\" as type although class does not have a parent");
RETURN_THROWS();
}
ce = ce->parent;
@@ -2533,7 +2533,7 @@ ZEND_METHOD(ReflectionParameter, getClass)
ce = zend_lookup_class(class_name);
if (!ce) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", ZSTR_VAL(class_name));
+ "Class \"%s\" does not exist", ZSTR_VAL(class_name));
RETURN_THROWS();
}
}
@@ -3023,7 +3023,7 @@ ZEND_METHOD(ReflectionMethod, __construct)
if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) {
if (!EG(exception)) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", Z_STRVAL_P(classname));
+ "Class \"%s\" does not exist", Z_STRVAL_P(classname));
}
if (classname == &ztmp) {
zval_ptr_dtor_str(&ztmp);
@@ -3537,7 +3537,7 @@ ZEND_METHOD(ReflectionClassConstant, __construct)
case IS_STRING:
if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", Z_STRVAL_P(classname));
+ "Class \"%s\" does not exist", Z_STRVAL_P(classname));
RETURN_THROWS();
}
break;
@@ -3552,7 +3552,7 @@ ZEND_METHOD(ReflectionClassConstant, __construct)
}
if ((constant = zend_hash_find_ptr(&ce->constants_table, constname)) == NULL) {
- zend_throw_exception_ex(reflection_exception_ptr, 0, "Class Constant %s::%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(constname));
+ zend_throw_exception_ex(reflection_exception_ptr, 0, "Constant %s::%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(constname));
RETURN_THROWS();
}
@@ -3739,7 +3739,7 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob
if ((ce = zend_lookup_class(Z_STR_P(argument))) == NULL) {
if (!EG(exception)) {
- zend_throw_exception_ex(reflection_exception_ptr, -1, "Class %s does not exist", Z_STRVAL_P(argument));
+ zend_throw_exception_ex(reflection_exception_ptr, -1, "Class \"%s\" does not exist", Z_STRVAL_P(argument));
}
RETURN_THROWS();
}
@@ -3876,7 +3876,7 @@ ZEND_METHOD(ReflectionClass, getStaticPropertyValue)
ZVAL_COPY(return_value, def_value);
} else {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not have a property named %s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ "Property %s::$%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name));
}
return;
} else {
@@ -4173,7 +4173,7 @@ ZEND_METHOD(ReflectionClass, getMethod)
reflection_method_factory(ce, mptr, NULL, return_value);
} else {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Method %s does not exist", ZSTR_VAL(name));
+ "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name));
}
zend_string_release(lc_name);
}
@@ -4307,7 +4307,7 @@ ZEND_METHOD(ReflectionClass, getProperty)
ce2 = zend_lookup_class(classname);
if (!ce2) {
if (!EG(exception)) {
- zend_throw_exception_ex(reflection_exception_ptr, -1, "Class %s does not exist", ZSTR_VAL(classname));
+ zend_throw_exception_ex(reflection_exception_ptr, -1, "Class \"%s\" does not exist", ZSTR_VAL(classname));
}
zend_string_release_ex(classname, 0);
RETURN_THROWS();
@@ -4315,7 +4315,7 @@ ZEND_METHOD(ReflectionClass, getProperty)
zend_string_release_ex(classname, 0);
if (!instanceof_function(ce, ce2)) {
- zend_throw_exception_ex(reflection_exception_ptr, -1, "Fully qualified property name %s::%s does not specify a base class of %s", ZSTR_VAL(ce2->name), str_name, ZSTR_VAL(ce->name));
+ zend_throw_exception_ex(reflection_exception_ptr, -1, "Fully qualified property name %s::$%s does not specify a base class of %s", ZSTR_VAL(ce2->name), str_name, ZSTR_VAL(ce->name));
RETURN_THROWS();
}
ce = ce2;
@@ -4328,8 +4328,7 @@ ZEND_METHOD(ReflectionClass, getProperty)
return;
}
}
- zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Property %s does not exist", str_name);
+ zend_throw_exception_ex(reflection_exception_ptr, 0, "Property %s::$%s does not exist", ZSTR_VAL(ce->name), str_name);
}
/* }}} */
@@ -4980,7 +4979,7 @@ ZEND_METHOD(ReflectionClass, isSubclassOf)
case IS_STRING:
if ((class_ce = zend_lookup_class(Z_STR_P(class_name))) == NULL) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", Z_STRVAL_P(class_name));
+ "Class \"%s\" does not exist", Z_STRVAL_P(class_name));
RETURN_THROWS();
}
break;
@@ -5021,7 +5020,7 @@ ZEND_METHOD(ReflectionClass, implementsInterface)
case IS_STRING:
if ((interface_ce = zend_lookup_class(Z_STR_P(interface))) == NULL) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Interface %s does not exist", Z_STRVAL_P(interface));
+ "Interface \"%s\" does not exist", Z_STRVAL_P(interface));
RETURN_THROWS();
}
break;
@@ -5200,7 +5199,7 @@ ZEND_METHOD(ReflectionProperty, __construct)
case IS_STRING:
if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", Z_STRVAL_P(classname));
+ "Class \"%s\" does not exist", Z_STRVAL_P(classname));
RETURN_THROWS();
}
break;
@@ -5372,7 +5371,7 @@ ZEND_METHOD(ReflectionProperty, getValue)
if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Cannot access non-public member %s::$%s",
+ "Cannot access non-public property %s::$%s",
ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name));
RETURN_THROWS();
}
@@ -5422,7 +5421,7 @@ ZEND_METHOD(ReflectionProperty, setValue)
if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Cannot access non-public member %s::$%s",
+ "Cannot access non-public property %s::$%s",
ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name));
RETURN_THROWS();
}
@@ -5461,7 +5460,7 @@ ZEND_METHOD(ReflectionProperty, isInitialized)
if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Cannot access non-public member %s::$%s",
+ "Cannot access non-public property %s::$%s",
ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name));
RETURN_THROWS();
}
@@ -5681,7 +5680,7 @@ ZEND_METHOD(ReflectionExtension, __construct)
if ((module = zend_hash_str_find_ptr(&module_registry, lcname, name_len)) == NULL) {
free_alloca(lcname, use_heap);
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Extension %s does not exist", name_str);
+ "Extension \"%s\" does not exist", name_str);
RETURN_THROWS();
}
free_alloca(lcname, use_heap);
@@ -6017,7 +6016,7 @@ ZEND_METHOD(ReflectionZendExtension, __construct)
extension = zend_get_extension(name_str);
if (!extension) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Zend Extension %s does not exist", name_str);
+ "Zend Extension \"%s\" does not exist", name_str);
RETURN_THROWS();
}
ZVAL_STRING(reflection_prop_name(object), extension->name);
@@ -6313,7 +6312,7 @@ static int call_attribute_constructor(zend_class_entry *ce, zend_object *obj, zv
ZEND_ASSERT(ctor != NULL);
if (!(ctor->common.fn_flags & ZEND_ACC_PUBLIC)) {
- zend_throw_error(NULL, "Attribute constructor of class '%s' must be public", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Attribute constructor of class %s must be public", ZSTR_VAL(ce->name));
return FAILURE;
}
@@ -6366,12 +6365,12 @@ ZEND_METHOD(ReflectionAttribute, newInstance)
GET_REFLECTION_OBJECT_PTR(attr);
if (NULL == (ce = zend_lookup_class(attr->data->name))) {
- zend_throw_error(NULL, "Attribute class '%s' not found", ZSTR_VAL(attr->data->name));
+ zend_throw_error(NULL, "Attribute class \"%s\" not found", ZSTR_VAL(attr->data->name));
RETURN_THROWS();
}
if (NULL == (marker = zend_get_attribute_str(ce->attributes, ZEND_STRL("attribute")))) {
- zend_throw_error(NULL, "Attempting to use non-attribute class '%s' as attribute", ZSTR_VAL(attr->data->name));
+ zend_throw_error(NULL, "Attempting to use non-attribute class \"%s\" as attribute", ZSTR_VAL(attr->data->name));
RETURN_THROWS();
}
@@ -6434,7 +6433,7 @@ ZEND_METHOD(ReflectionAttribute, newInstance)
}
} else if (argc) {
attribute_ctor_cleanup(&obj, args, argc);
- zend_throw_error(NULL, "Attribute class '%s' does not have a constructor, cannot pass arguments", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Attribute class %s does not have a constructor, cannot pass arguments", ZSTR_VAL(ce->name));
RETURN_THROWS();
}
diff --git a/ext/reflection/tests/007.phpt b/ext/reflection/tests/007.phpt
index df1d97eea9..53622ec19c 100644
--- a/ext/reflection/tests/007.phpt
+++ b/ext/reflection/tests/007.phpt
@@ -91,7 +91,7 @@ test('WithCtorWithArgs');
--EXPECTF--
====>Class_does_not_exist
{closure}(Class_does_not_exist)
-string(41) "Class Class_does_not_exist does not exist"
+string(43) "Class "Class_does_not_exist" does not exist"
====>NoCtor
====>newInstance()
object(NoCtor)#%d (0) {
@@ -148,4 +148,3 @@ array(2) {
}
object(WithCtorWithArgs)#%d (0) {
}
-
diff --git a/ext/reflection/tests/008.phpt b/ext/reflection/tests/008.phpt
index 0b9a867884..99081c66df 100644
--- a/ext/reflection/tests/008.phpt
+++ b/ext/reflection/tests/008.phpt
@@ -29,11 +29,11 @@ echo "Done\n";
--EXPECT--
string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name"
string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name"
-string(21) "Class does not exist"
-string(22) "Class a does not exist"
-string(21) "Class does not exist"
-string(22) "Class a does not exist"
-string(21) "Class does not exist"
+string(23) "Class "" does not exist"
+string(24) "Class "a" does not exist"
+string(23) "Class "" does not exist"
+string(24) "Class "a" does not exist"
+string(23) "Class "" does not exist"
string(104) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, int given"
-string(21) "Class does not exist"
+string(23) "Class "" does not exist"
Done
diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt
index 414fac8543..2ab8990d95 100644
--- a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt
+++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt
@@ -154,7 +154,7 @@ bool(false)
**********************************
-Fatal error: Uncaught ReflectionException: Class Constant TestClass::BAD_CONST does not exist in %s:%d
+Fatal error: Uncaught ReflectionException: Constant TestClass::BAD_CONST does not exist in %s:%d
Stack trace:
#0 %s(%d): ReflectionClassConstant->__construct(Object(TestClass), 'BAD_CONST')
#1 %s(%d): reflectClassConstant(Object(TestClass), 'BAD_CONST')
diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
index 3744fec06c..54f4b8eda2 100644
--- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt
@@ -47,11 +47,11 @@ try {
?>
--EXPECTF--
ReflectionClass::__construct() expects exactly 1 parameter, 0 given
-Class does not exist
-Class 1 does not exist
-Class 1 does not exist
+Class "" does not exist
+Class "1" does not exist
+Class "1" does not exist
Warning: Array to string conversion in %s on line %d
-Class Array does not exist
+Class "Array" does not exist
ReflectionClass::__construct() expects exactly 1 parameter, 2 given
-Class X does not exist
+Class "X" does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
index c8a2ed14ed..4e89466af0 100644
--- a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt
@@ -65,7 +65,7 @@ Reflecting on class pubf:
["class"]=>
string(4) "pubf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method pubf::doesNotExist() does not exist
Reflecting on class subpubf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@@ -85,7 +85,7 @@ Reflecting on class subpubf:
["class"]=>
string(4) "pubf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method subpubf::doesNotExist() does not exist
Reflecting on class protf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@@ -105,7 +105,7 @@ Reflecting on class protf:
["class"]=>
string(5) "protf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method protf::doesNotExist() does not exist
Reflecting on class subprotf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@@ -125,7 +125,7 @@ Reflecting on class subprotf:
["class"]=>
string(5) "protf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method subprotf::doesNotExist() does not exist
Reflecting on class privf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@@ -145,7 +145,7 @@ Reflecting on class privf:
["class"]=>
string(5) "privf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method privf::doesNotExist() does not exist
Reflecting on class subprivf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@@ -165,4 +165,4 @@ Reflecting on class subprivf:
["class"]=>
string(5) "privf"
}
- --> Check for doesNotExist(): Method doesNotExist does not exist
+ --> Check for doesNotExist(): Method subprivf::doesNotExist() does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
index e5dce75367..99d5bb7e86 100644
--- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt
@@ -58,9 +58,9 @@ try {
Check invalid params:
ReflectionClass::getMethod() expects exactly 1 parameter, 0 given
ReflectionClass::getMethod() expects exactly 1 parameter, 2 given
-Method does not exist
-Method 1 does not exist
-Method 1.5 does not exist
-Method 1 does not exist
+Method C::() does not exist
+Method C::1() does not exist
+Method C::1.5() does not exist
+Method C::1() does not exist
ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given
ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, C given
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
index 2d5494b264..e2e6e3ba3c 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt
@@ -72,8 +72,8 @@ Reflecting on class pubf:
["class"]=>
string(4) "pubf"
}
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for A: Property pubf::$A does not exist
+ --> Check for doesNotExist: Property pubf::$doesNotExist does not exist
Reflecting on class subpubf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -87,8 +87,8 @@ Reflecting on class subpubf:
["class"]=>
string(4) "pubf"
}
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for A: Property subpubf::$A does not exist
+ --> Check for doesNotExist: Property subpubf::$doesNotExist does not exist
Reflecting on class protf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -102,8 +102,8 @@ Reflecting on class protf:
["class"]=>
string(5) "protf"
}
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for A: Property protf::$A does not exist
+ --> Check for doesNotExist: Property protf::$doesNotExist does not exist
Reflecting on class subprotf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -117,8 +117,8 @@ Reflecting on class subprotf:
["class"]=>
string(5) "protf"
}
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for A: Property subprotf::$A does not exist
+ --> Check for doesNotExist: Property subprotf::$doesNotExist does not exist
Reflecting on class privf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -132,8 +132,8 @@ Reflecting on class privf:
["class"]=>
string(5) "privf"
}
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for A: Property privf::$A does not exist
+ --> Check for doesNotExist: Property privf::$doesNotExist does not exist
Reflecting on class subprivf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -141,6 +141,6 @@ Reflecting on class subprivf:
["class"]=>
string(5) "privf"
}
- --> Check for a: Property a does not exist
- --> Check for A: Property A does not exist
- --> Check for doesNotExist: Property doesNotExist does not exist
+ --> Check for a: Property subprivf::$a does not exist
+ --> Check for A: Property subprivf::$A does not exist
+ --> Check for doesNotExist: Property subprivf::$doesNotExist does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
index 61d29b89d7..606a124d5c 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt
@@ -56,9 +56,9 @@ try {
Check invalid params:
ReflectionClass::getProperty() expects exactly 1 parameter, 0 given
ReflectionClass::getProperty() expects exactly 1 parameter, 2 given
-Property does not exist
-Property 1 does not exist
-Property 1.5 does not exist
-Property 1 does not exist
+Property C::$ does not exist
+Property C::$1 does not exist
+Property C::$1.5 does not exist
+Property C::$1 does not exist
ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given
ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, C given
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
index 34ade2fc5e..b3c2ceb88a 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
@@ -110,9 +110,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member C::$protA
+Cannot access non-public property C::$protA
--- (Reflecting on privA) ---
-Property privA does not exist
+Property C::$privA does not exist
--- (Reflecting on pubB) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -128,9 +128,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member C::$protB
+Cannot access non-public property C::$protB
--- (Reflecting on privB) ---
-Property privB does not exist
+Property C::$privB does not exist
--- (Reflecting on pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$protC
+Cannot access non-public property C::$protC
--- (Reflecting on privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -154,9 +154,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$privC
+Cannot access non-public property C::$privC
--- (Reflecting on doesNotExist) ---
-Property doesNotExist does not exist
+Property C::$doesNotExist does not exist
--- (Reflecting on A::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::$protC
+Cannot access non-public property A::$protC
--- (Reflecting on A::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::$privC
+Cannot access non-public property A::$privC
--- (Reflecting on B::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::$protC
+Cannot access non-public property B::$protC
--- (Reflecting on B::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::$privC
+Cannot access non-public property B::$privC
--- (Reflecting on c::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -214,7 +214,7 @@ object(ReflectionProperty)#%d (2) {
}
string(9) "pubC in C"
--- (Reflecting on c::PUBC) ---
-Property PUBC does not exist
+Property C::$PUBC does not exist
--- (Reflecting on C::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$protC
+Cannot access non-public property C::$protC
--- (Reflecting on C::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -238,14 +238,14 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$privC
+Cannot access non-public property C::$privC
--- (Reflecting on X::pubC) ---
-Fully qualified property name X::pubC does not specify a base class of C
+Fully qualified property name X::$pubC does not specify a base class of C
--- (Reflecting on X::protC) ---
-Fully qualified property name X::protC does not specify a base class of C
+Fully qualified property name X::$protC does not specify a base class of C
--- (Reflecting on X::privC) ---
-Fully qualified property name X::privC does not specify a base class of C
+Fully qualified property name X::$privC does not specify a base class of C
--- (Reflecting on X::doesNotExist) ---
-Fully qualified property name X::doesNotExist does not specify a base class of C
+Fully qualified property name X::$doesNotExist does not specify a base class of C
--- (Reflecting on doesNotexist::doesNotExist) ---
-Class doesnotexist does not exist
+Class "doesnotexist" does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
index b5396aae40..bbc9963d8a 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
@@ -110,9 +110,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member C::$protA
+Cannot access non-public property C::$protA
--- (Reflecting on privA) ---
-Property privA does not exist
+Property C::$privA does not exist
--- (Reflecting on pubB) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -128,9 +128,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member C::$protB
+Cannot access non-public property C::$protB
--- (Reflecting on privB) ---
-Property privB does not exist
+Property C::$privB does not exist
--- (Reflecting on pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$protC
+Cannot access non-public property C::$protC
--- (Reflecting on privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -154,9 +154,9 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$privC
+Cannot access non-public property C::$privC
--- (Reflecting on doesNotExist) ---
-Property doesNotExist does not exist
+Property C::$doesNotExist does not exist
--- (Reflecting on A::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::$protC
+Cannot access non-public property A::$protC
--- (Reflecting on A::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::$privC
+Cannot access non-public property A::$privC
--- (Reflecting on B::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::$protC
+Cannot access non-public property B::$protC
--- (Reflecting on B::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::$privC
+Cannot access non-public property B::$privC
--- (Reflecting on c::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -214,7 +214,7 @@ object(ReflectionProperty)#%d (2) {
}
string(9) "pubC in C"
--- (Reflecting on c::PUBC) ---
-Property PUBC does not exist
+Property C::$PUBC does not exist
--- (Reflecting on C::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$protC
+Cannot access non-public property C::$protC
--- (Reflecting on C::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -238,14 +238,14 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::$privC
+Cannot access non-public property C::$privC
--- (Reflecting on X::pubC) ---
-Fully qualified property name X::pubC does not specify a base class of C
+Fully qualified property name X::$pubC does not specify a base class of C
--- (Reflecting on X::protC) ---
-Fully qualified property name X::protC does not specify a base class of C
+Fully qualified property name X::$protC does not specify a base class of C
--- (Reflecting on X::privC) ---
-Fully qualified property name X::privC does not specify a base class of C
+Fully qualified property name X::$privC does not specify a base class of C
--- (Reflecting on X::doesNotExist) ---
-Fully qualified property name X::doesNotExist does not specify a base class of C
+Fully qualified property name X::$doesNotExist does not specify a base class of C
--- (Reflecting on doesNotexist::doesNotExist) ---
-Class doesnotexist does not exist
+Class "doesnotexist" does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
index 2b4cd27a94..8a1951062f 100644
--- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt
@@ -61,5 +61,5 @@ string(17) "changed protected"
string(14) "changed public"
Retrieving non-existent values from A with no default value:
-Class A does not have a property named protectedDoesNotExist
-Class A does not have a property named privateDoesNotExist
+Property A::$protectedDoesNotExist does not exist
+Property A::$privateDoesNotExist does not exist
diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
index e034e08215..3e21780231 100644
--- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
@@ -41,6 +41,6 @@ try {
--EXPECT--
ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given
ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given
-Class C does not have a property named
+Property C::$ does not exist
string(3) "def"
ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given
diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
index d912b568e8..38990073a1 100644
--- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
@@ -147,5 +147,5 @@ Test bad arguments:
ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given
ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given
ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, null given
-Interface ThisClassDoesNotExist does not exist
+Interface "ThisClassDoesNotExist" does not exist
ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
index 6d4ae500a9..fd9193e0a4 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
@@ -40,5 +40,5 @@ Test bad arguments:
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given
-Class ThisClassDoesNotExist does not exist
+Class "ThisClassDoesNotExist" does not exist
ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt
index bb4f96818a..1d804641f3 100644
--- a/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt
+++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt
@@ -9,7 +9,7 @@ var_dump($rc->isSubclassOf('X'));
?>
--EXPECTF--
-Fatal error: Uncaught ReflectionException: Class X does not exist in %s:5
+Fatal error: Uncaught ReflectionException: Class "X" does not exist in %s:%d
Stack trace:
#0 %s(5): ReflectionClass->isSubclassOf('X')
#1 {main}
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
index 391beced52..b9b2f35388 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt
@@ -80,7 +80,7 @@ Stack trace:
#0 %s ReflectionMethod->__construct(true, 'foo')
#1 {main}
Wrong type of argument (string, bool):
-ReflectionException: Method TestClass::1() does not exist in %s
+ReflectionException: Method TestClass::1() does not exist in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('TestClass', '1')
#1 {main}
@@ -90,12 +90,12 @@ Stack trace:
#0 %s ReflectionMethod->__construct('TestClass')
#1 {main}
Class and Method in same string, bad method name:
-ReflectionException: Method TestClass::foop::dedoop() does not exist in %s
+ReflectionException: Method TestClass::foop::dedoop() does not exist in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('TestClass::foop...')
#1 {main}
Class and Method in same string, bad class name:
-ReflectionException: Class TestCla does not exist in %s
+ReflectionException: Class "TestCla" does not exist in %s:%d
Stack trace:
#0 %s ReflectionMethod->__construct('TestCla::foo')
#1 {main}
diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
index cf0d3bbbaa..3f5dcb3f6c 100644
--- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
+++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt
@@ -56,6 +56,6 @@ Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given
Too many arguments:
Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given
-Ok - Class InvalidClassName does not exist
+Ok - Class "InvalidClassName" does not exist
Ok - ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, array given
Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 2 given
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
index 30f769aa3d..a8a927280e 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
@@ -40,5 +40,5 @@ Test bad arguments:
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given
ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given
ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given
-Class ThisClassDoesNotExist does not exist
+Class "ThisClassDoesNotExist" does not exist
ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given
diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
index 582bcffe65..71079650fe 100644
--- a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
+++ b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt
@@ -9,7 +9,7 @@ var_dump($ro->isSubclassOf('X'));
?>
--EXPECTF--
-Fatal error: Uncaught ReflectionException: Class X does not exist in %s:%d
+Fatal error: Uncaught ReflectionException: Class "X" does not exist in %s:%d
Stack trace:
#0 %s(%d): ReflectionClass->isSubclassOf('X')
#1 {main}
diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
index fd83e30aaa..5fa249a9b5 100644
--- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
+++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
@@ -40,7 +40,7 @@ echo "Done.\n";
?>
--EXPECT--
-Class A does not exist
+Class "A" does not exist
Method C::b() does not exist
Method C::b() does not exist
Ok - ReflectionParameter::__construct() expects exactly 2 parameters, 1 given
diff --git a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
index a2df954309..cf5fa00396 100644
--- a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt
@@ -35,7 +35,7 @@ catch(Exception $e) {
?>
--EXPECT--
Non-existent class:
-Class NonExistentClass does not exist
+Class "NonExistentClass" does not exist
Wrong property parameter type:
ReflectionProperty::__construct(): Argument #1 ($class) must be of type object|string, int given
diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
index 40254319cc..49b3c7bd9a 100644
--- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
@@ -60,7 +60,7 @@ Static property / too many args:
ReflectionProperty::getValue() expects at most 1 parameter, 2 given
Protected property:
-Cannot access non-public member TestClass::$prot
+Cannot access non-public property TestClass::$prot
Invalid instance:
Given object is not an instance of the class this property was declared in
diff --git a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
index ac87873c6a..74e25252d1 100644
--- a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
+++ b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt
@@ -109,7 +109,7 @@ Dynamic properties:
bool(true)
bool(false)
Visibility handling:
-Cannot access non-public member A::$p
+Cannot access non-public property A::$p
bool(false)
Object type:
bool(false)
diff --git a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
index fd82a47198..f0d49a56cb 100644
--- a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
@@ -116,10 +116,10 @@ var_dump($protectedStatic->getValue());
var_dump($private->getValue($b));
?>
--EXPECT--
-string(45) "Cannot access non-public member A::$protected"
-string(51) "Cannot access non-public member A::$protectedStatic"
-string(43) "Cannot access non-public member A::$private"
-string(49) "Cannot access non-public member A::$privateStatic"
+string(47) "Cannot access non-public property A::$protected"
+string(53) "Cannot access non-public property A::$protectedStatic"
+string(45) "Cannot access non-public property A::$private"
+string(51) "Cannot access non-public property A::$privateStatic"
string(1) "a"
string(1) "b"
string(1) "c"
@@ -128,9 +128,9 @@ string(1) "e"
string(1) "f"
string(1) "g"
string(1) "h"
-string(45) "Cannot access non-public member B::$protected"
-string(51) "Cannot access non-public member B::$protectedStatic"
-string(43) "Cannot access non-public member A::$private"
+string(47) "Cannot access non-public property B::$protected"
+string(53) "Cannot access non-public property B::$protectedStatic"
+string(45) "Cannot access non-public property A::$private"
string(1) "a"
string(1) "f"
string(1) "c"
diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
index 1f0c2b5f2b..4b29be8f73 100644
--- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
@@ -34,7 +34,7 @@ var_dump($instanceWithNoProperties->pub2);
?>
--EXPECT--
Protected property:
-Cannot access non-public member TestClass::$prot
+Cannot access non-public property TestClass::$prot
Instance without property:
NULL
diff --git a/ext/reflection/tests/ReflectionReference_errors.phpt b/ext/reflection/tests/ReflectionReference_errors.phpt
index 0d1d63eb28..6d7ca3ae3d 100644
--- a/ext/reflection/tests/ReflectionReference_errors.phpt
+++ b/ext/reflection/tests/ReflectionReference_errors.phpt
@@ -40,7 +40,7 @@ var_dump(unserialize('O:19:"ReflectionReference":0:{}'));
?>
--EXPECTF--
-Call to private ReflectionReference::__construct() from invalid context
+Call to private ReflectionReference::__construct() from global scope
ReflectionReference::fromArrayElement(): Argument #1 ($array) must be of type array, stdClass given
ReflectionReference::fromArrayElement(): Argument #2 ($key) must be of type string|int, float given
Array key not found
diff --git a/ext/reflection/tests/ReflectionZendExtension_error.phpt b/ext/reflection/tests/ReflectionZendExtension_error.phpt
index cd06b96465..9941d91e2e 100644
--- a/ext/reflection/tests/ReflectionZendExtension_error.phpt
+++ b/ext/reflection/tests/ReflectionZendExtension_error.phpt
@@ -14,4 +14,4 @@ try {
?>
--EXPECT--
-Zend Extension zend_opcache does not exist
+Zend Extension "zend_opcache" does not exist
diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt
index eec6f09411..42be0e6ede 100644
--- a/ext/reflection/tests/bug37816.phpt
+++ b/ext/reflection/tests/bug37816.phpt
@@ -23,4 +23,4 @@ catch (Exception $e)
?>
--EXPECT--
-Caught: Cannot access non-public member TestClass::$p
+Caught: Cannot access non-public property TestClass::$p
diff --git a/ext/reflection/tests/bug49719.phpt b/ext/reflection/tests/bug49719.phpt
index 37f6ae38af..b39ca3481c 100644
--- a/ext/reflection/tests/bug49719.phpt
+++ b/ext/reflection/tests/bug49719.phpt
@@ -40,5 +40,5 @@ var_dump($prop->getValue(new b2));
bool(false)
bool(false)
bool(false)
-string(25) "Property a does not exist"
+string(29) "Property B::$a does not exist"
int(2)
diff --git a/ext/reflection/tests/bug74673.phpt b/ext/reflection/tests/bug74673.phpt
index 321195c16e..a8b9d998ca 100644
--- a/ext/reflection/tests/bug74673.phpt
+++ b/ext/reflection/tests/bug74673.phpt
@@ -15,7 +15,7 @@ $class = new ReflectionClass('A');
echo $class;
?>
--EXPECTF--
-Fatal error: Uncaught Error: Undefined constant 'PHP_SELF' in %s:%d
+Fatal error: Uncaught Error: Undefined constant "PHP_SELF" in %s:%d
Stack trace:
#0 %s(%d): ReflectionClass->__toString()
#1 {main}
diff --git a/ext/reflection/tests/parameters_002.phpt b/ext/reflection/tests/parameters_002.phpt
index e25310a6c7..f27f4ab6fd 100644
--- a/ext/reflection/tests/parameters_002.phpt
+++ b/ext/reflection/tests/parameters_002.phpt
@@ -131,7 +131,7 @@ getName: string(2) "na"
isPassedByReference: bool(false)
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
-Class NonExistingClass does not exist
+Class "NonExistingClass" does not exist
getDeclaringClass: NULL
isArray:
Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
@@ -225,7 +225,7 @@ getName: string(2) "na"
isPassedByReference: bool(false)
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
-Class NonExistingClass does not exist
+Class "NonExistingClass" does not exist
getDeclaringClass: test
isArray:
Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
diff --git a/ext/session/tests/bug24592.phpt b/ext/session/tests/bug24592.phpt
index 3e651cdeec..c4e9ee77eb 100644
--- a/ext/session/tests/bug24592.phpt
+++ b/ext/session/tests/bug24592.phpt
@@ -20,9 +20,9 @@ $_SESSION['bar'] = $bar;
var_dump($_SESSION);
?>
--EXPECTF--
-Notice: Undefined index: foo in %s on line %d
+Notice: Undefined array key "foo" in %s on line %d
-Notice: Undefined index: bar in %s on line %d
+Notice: Undefined array key "bar" in %s on line %d
NULL
NULL
array(0) {
diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt
index 1cc4faf959..ef7ca1fc42 100644
--- a/ext/soap/tests/bugs/bug54911.phpt
+++ b/ext/soap/tests/bugs/bug54911.phpt
@@ -13,7 +13,7 @@ Bug #54911 (Access to a undefined member in inherit SoapClient may cause Segment
$client->__soapCall('', array());
?>
--EXPECTF--
-Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property: XSoapClient::$crash in %sbug54911.php:4
+Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property XSoapClient::$crash in %sbug54911.php:4
Stack trace:
#0 [internal function]: XSoapClient->__doRequest('<?xml version="...', '', '#', 1, 0)
#1 %sbug54911.php(8): SoapClient->__soapCall('', Array)
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index c7b7edd4fd..f8039c64af 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -313,13 +313,13 @@ fetch_dim_string:
if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_W: {
ZVAL_NULL(retval);
}
@@ -329,13 +329,13 @@ fetch_dim_string:
} else {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key));
case BP_VAR_W: {
zval value;
ZVAL_NULL(&value);
@@ -363,13 +363,13 @@ num_index:
if ((retval = zend_hash_index_find(ht, index)) == NULL) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, index);
+ zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index);
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, index);
+ zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index);
case BP_VAR_W: {
zval value;
ZVAL_UNDEF(&value);
@@ -541,7 +541,7 @@ try_again:
ht = spl_array_get_hash_table(intern);
if (ht == &EG(symbol_table)) {
if (zend_delete_global_variable(Z_STR_P(offset))) {
- zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
} else {
zval *data = zend_symtable_find(ht, Z_STR_P(offset));
@@ -550,7 +550,7 @@ try_again:
if (Z_TYPE_P(data) == IS_INDIRECT) {
data = Z_INDIRECT_P(data);
if (Z_TYPE_P(data) == IS_UNDEF) {
- zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
} else {
zval_ptr_dtor(data);
ZVAL_UNDEF(data);
@@ -561,10 +561,10 @@ try_again:
}
}
} else if (zend_symtable_del(ht, Z_STR_P(offset)) == FAILURE) {
- zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
} else {
- zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset));
+ zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset));
}
}
break;
@@ -585,7 +585,7 @@ try_again:
num_index:
ht = spl_array_get_hash_table(intern);
if (zend_hash_index_del(ht, index) == FAILURE) {
- zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, index);
+ zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, index);
}
break;
case IS_REFERENCE:
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index b53c2b8722..45af9c270b 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1925,7 +1925,7 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
zend_function *func_ptr; \
func_ptr = (zend_function *)zend_hash_str_find_ptr(EG(function_table), #func_name, sizeof(#func_name) - 1); \
if (func_ptr == NULL) { \
- zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Internal error, function '%s' not found. Please report", #func_name); \
+ zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Internal error, function %s() not found. Please report", #func_name); \
return; \
} \
spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, arg2); \
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index d7dac8ac68..ca1a5457e2 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -2484,7 +2484,7 @@ PHP_METHOD(CachingIterator, offsetGet)
}
if ((value = zend_symtable_find(Z_ARRVAL(intern->u.caching.zcache), key)) == NULL) {
- zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(key));
+ zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(key));
return;
}
diff --git a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
index c1b373cebe..228a581809 100644
--- a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
+++ b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
@@ -13,4 +13,4 @@ try {
?>
--EXPECT--
-SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'stdClass' given
+SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, stdClass given
diff --git a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
index f9ef81aeeb..d3f49f1814 100644
--- a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
+++ b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
@@ -13,4 +13,4 @@ try {
?>
--EXPECT--
-SplFileInfo::setInfoClass(): Argument #1 ($class_name) must be a class name derived from SplFileInfo, 'stdClass' given
+SplFileInfo::setInfoClass(): Argument #1 ($class_name) must be a class name derived from SplFileInfo, stdClass given
diff --git a/ext/spl/tests/arrayObject___construct_basic2.phpt b/ext/spl/tests/arrayObject___construct_basic2.phpt
index 2e5970004e..33f0a68eb9 100644
--- a/ext/spl/tests/arrayObject___construct_basic2.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic2.phpt
@@ -63,7 +63,7 @@ bool(true)
Warning: Undefined property: ArrayObject::$prop in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,7 +91,7 @@ bool(true)
Warning: Undefined property: MyArrayObject::$prop in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic3.phpt b/ext/spl/tests/arrayObject___construct_basic3.phpt
index 2628c991a7..3ac7e0a75a 100644
--- a/ext/spl/tests/arrayObject___construct_basic3.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic3.phpt
@@ -63,7 +63,7 @@ bool(true)
Warning: Undefined property: ArrayObject::$prop in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,7 +91,7 @@ bool(true)
Warning: Undefined property: MyArrayObject::$prop in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic4.phpt b/ext/spl/tests/arrayObject___construct_basic4.phpt
index ba0ab08ff6..89069ec871 100644
--- a/ext/spl/tests/arrayObject___construct_basic4.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic4.phpt
@@ -61,11 +61,11 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined index: prop in %s on line 39
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,9 +91,9 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_basic5.phpt b/ext/spl/tests/arrayObject___construct_basic5.phpt
index 93fcf256ee..a382c7bfc5 100644
--- a/ext/spl/tests/arrayObject___construct_basic5.phpt
+++ b/ext/spl/tests/arrayObject___construct_basic5.phpt
@@ -61,11 +61,11 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined index: prop in %s on line 39
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
@@ -91,9 +91,9 @@ bool(true)
bool(true)
- Unset:
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
-Notice: Undefined index: prop in %s on line 40
+Notice: Undefined array key "prop" in %s on line %d
NULL
NULL
- After:
diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt
index 3ac214260a..beac9a76ab 100644
--- a/ext/spl/tests/arrayObject___construct_error1.phpt
+++ b/ext/spl/tests/arrayObject___construct_error1.phpt
@@ -20,6 +20,6 @@ try {
?>
--EXPECT--
Bad iterator type:
-ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'Exception' given(6)
+ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, Exception given(6)
Non-existent class:
-ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClassName' given(13)
+ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, nonExistentClassName given(13)
diff --git a/ext/spl/tests/arrayObject_magicMethods1.phpt b/ext/spl/tests/arrayObject_magicMethods1.phpt
index dbe75bff24..a9acf72ff7 100644
--- a/ext/spl/tests/arrayObject_magicMethods1.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods1.phpt
@@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined index: nonexistent in %s on line 42
+Notice: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined index: nonexistent in %s on line 60
+Notice: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(UsesMagic)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods3.phpt b/ext/spl/tests/arrayObject_magicMethods3.phpt
index f8b2c2e41c..adca465525 100644
--- a/ext/spl/tests/arrayObject_magicMethods3.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods3.phpt
@@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined index: nonexistent in %s on line 42
+Notice: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined index: nonexistent in %s on line 60
+Notice: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(UsesMagic)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods4.phpt b/ext/spl/tests/arrayObject_magicMethods4.phpt
index e038a1e09c..5227e729af 100644
--- a/ext/spl/tests/arrayObject_magicMethods4.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods4.phpt
@@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined index: nonexistent in %s on line 45
+Notice: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined index: nonexistent in %s on line 63
+Notice: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(C)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_magicMethods6.phpt b/ext/spl/tests/arrayObject_magicMethods6.phpt
index e0ccb43dd4..d7bf712441 100644
--- a/ext/spl/tests/arrayObject_magicMethods6.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods6.phpt
@@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) {
--> Read existent, non-existent and dynamic:
string(7) "changed"
-Notice: Undefined index: nonexistent in %s on line 45
+Notice: Undefined array key "nonexistent" in %s on line %d
NULL
string(11) "new.changed"
Original wrapped object:
@@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) {
--> Unset existent, non-existent and dynamic:
-Notice: Undefined index: nonexistent in %s on line 63
+Notice: Undefined array key "nonexistent" in %s on line %d
Original wrapped object:
object(C)#1 (3) {
["b"]=>
diff --git a/ext/spl/tests/arrayObject_setFlags_basic1.phpt b/ext/spl/tests/arrayObject_setFlags_basic1.phpt
index 173836cebc..3155390834 100644
--- a/ext/spl/tests/arrayObject_setFlags_basic1.phpt
+++ b/ext/spl/tests/arrayObject_setFlags_basic1.phpt
@@ -44,8 +44,8 @@ string(21) "array element.changed"
--> Remove the array element and try access again:
bool(false)
-Notice: Undefined index: p in %s on line 10
+Notice: Undefined array key "p" in %s on line %d
NULL
-Notice: Undefined index: p in %s on line 12
+Notice: Undefined array key "p" in %s on line %d
string(8) ".changed"
diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
index 918dcbee96..d178c06701 100644
--- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
+++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt
@@ -43,7 +43,7 @@ try {
?>
--EXPECT--
-string(130) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'nonExistentClass' given"
-string(122) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'stdClass' given"
-string(126) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClass' given"
-string(118) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'stdClass' given"
+string(128) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, nonExistentClass given"
+string(120) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, stdClass given"
+string(124) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, nonExistentClass given"
+string(116) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, stdClass given"
diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt
index 14543f472f..defb313f13 100644
--- a/ext/spl/tests/array_001.phpt
+++ b/ext/spl/tests/array_001.phpt
@@ -77,15 +77,15 @@ object(ArrayObject)#%d (1) {
}
int(0)
-Notice: Undefined offset: 6 in %sarray_001.php on line %d
+Notice: Undefined array key 6 in %s on line %d
NULL
-Notice: Undefined index: b in %sarray_001.php on line %d
+Notice: Undefined array key "b" in %s on line %d
NULL
-Notice: Undefined offset: 7 in %sarray_001.php on line %d
+Notice: Undefined array key 7 in %s on line %d
-Notice: Undefined index: c in %sarray_001.php on line %d
+Notice: Undefined array key "c" in %s on line %d
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(2) {
diff --git a/ext/spl/tests/array_010.phpt b/ext/spl/tests/array_010.phpt
index 1df3be5acb..27ba612a21 100644
--- a/ext/spl/tests/array_010.phpt
+++ b/ext/spl/tests/array_010.phpt
@@ -92,10 +92,10 @@ int(1)
string(3) "3rd"
int(4)
-Notice: Undefined index: 5th in %sarray_010.php on line %d
+Notice: Undefined array key "5th" in %sarray_010.php on line %d
NULL
-Notice: Undefined offset: 6 in %sarray_010.php on line %d
+Notice: Undefined array key 6 in %sarray_010.php on line %d
NULL
===offsetSet===
WRITE 1
@@ -126,9 +126,9 @@ array(6) {
string(9) "changed 6"
}
-Notice: Undefined offset: 7 in %sarray_010.php on line %d
+Notice: Undefined array key 7 in %sarray_010.php on line %d
-Notice: Undefined index: 8th in %sarray_010.php on line %d
+Notice: Undefined array key "8th" in %sarray_010.php on line %d
array(4) {
[0]=>
string(3) "1st"
diff --git a/ext/spl/tests/bug38325.phpt b/ext/spl/tests/bug38325.phpt
index 1911fc8eaf..5fa521a96c 100644
--- a/ext/spl/tests/bug38325.phpt
+++ b/ext/spl/tests/bug38325.phpt
@@ -6,7 +6,7 @@ spl_autoload_register();
new ThisClassDoesNotExistEverFoo();
?>
--EXPECTF--
-Fatal error: Uncaught Error: Class 'ThisClassDoesNotExistEverFoo' not found in %s:%d
+Fatal error: Uncaught Error: Class "ThisClassDoesNotExistEverFoo" not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line 3
diff --git a/ext/spl/tests/bug45622.phpt b/ext/spl/tests/bug45622.phpt
index ad84dda1d2..4e1f586315 100644
--- a/ext/spl/tests/bug45622.phpt
+++ b/ext/spl/tests/bug45622.phpt
@@ -41,7 +41,7 @@ string(13) "array element"
--> Remove the array element and try access again:
bool(false)
-Notice: Undefined index: p in %s on line %d
+Notice: Undefined array key "p" in %s on line %d
NULL
--> Re-add the real property:
diff --git a/ext/spl/tests/bug45622b.phpt b/ext/spl/tests/bug45622b.phpt
index c829b185dd..caaee5ea8e 100644
--- a/ext/spl/tests/bug45622b.phpt
+++ b/ext/spl/tests/bug45622b.phpt
@@ -25,9 +25,9 @@ isset($ao->prop4);
--EXPECTF--
Doesn't trigger __get.
-Notice: Undefined index: prop1 in %s on line 11
+Notice: Undefined array key "prop1" in %s on line %d
Doesn't trigger __set.
Doesn't trigger __unset.
-Notice: Undefined index: prop3 in %s on line 17
+Notice: Undefined array key "prop3" in %s on line %d
Shouldn't trigger __isset.
diff --git a/ext/spl/tests/bug48023.phpt b/ext/spl/tests/bug48023.phpt
index 9cb8dd2c1f..e42e2f4f03 100644
--- a/ext/spl/tests/bug48023.phpt
+++ b/ext/spl/tests/bug48023.phpt
@@ -9,7 +9,7 @@ new Foo;
?>
===DONE===
--EXPECTF--
-Fatal error: Uncaught Error: Class 'Foo' not found in %s:%d
+Fatal error: Uncaught Error: Class "Foo" not found in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/spl/tests/bug54323.phpt b/ext/spl/tests/bug54323.phpt
index a2e2522393..ce755f10c0 100644
--- a/ext/spl/tests/bug54323.phpt
+++ b/ext/spl/tests/bug54323.phpt
@@ -19,6 +19,6 @@ function testAccess($c, $ao) {
--EXPECTF--
Warning: Undefined property: C::$prop in %s on line %d
-Notice: Undefined index: prop in %sbug54323.php on line 14
+Notice: Undefined array key "prop" in %sbug54323.php on line 14
NULL
NULL
diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt
index 01ce807031..6da5b85a17 100644
--- a/ext/spl/tests/bug62978.phpt
+++ b/ext/spl/tests/bug62978.phpt
@@ -25,10 +25,10 @@ var_dump($a[$fp]);
fclose($fp);
--EXPECTF--
-Notice: Undefined index: epic_magic in %sbug62978.php on line %d
+Notice: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined index: epic_magic in %sbug62978.php on line %d
+Notice: Undefined array key "epic_magic" in %s on line %d
NULL
Warning: Undefined variable $c in %s on line %d
@@ -36,17 +36,17 @@ Warning: Undefined variable $c in %s on line %d
Warning: Trying to access array offset on value of type null in %s on line %d
NULL
-Notice: Undefined index: epic_magic in %sbug62978.php on line %d
+Notice: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined index: epic_magic in %sbug62978.php on line %d
+Notice: Undefined array key "epic_magic" in %s on line %d
NULL
-Notice: Undefined index: epic_magic in %sbug62978.php on line %d
+Notice: Undefined array key "epic_magic" in %s on line %d
NULL
bool(false)
Warning: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d
-Notice: Undefined offset: %d in %sbug62978.php on line %d
+Notice: Undefined array key %d in %sbug62978.php on line %d
NULL
diff --git a/ext/spl/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt
index 0ff909f422..72d5ef52a2 100644
--- a/ext/spl/tests/bug66834.phpt
+++ b/ext/spl/tests/bug66834.phpt
@@ -150,7 +150,7 @@ bool(false)
bool(true)
==== class with offsetGet() and offsetSet() ====
-Notice: Undefined index: foo in %s on line %d
+Notice: Undefined array key "foo" in %s on line %d
bool(false)
bool(true)
bool(false)
diff --git a/ext/spl/tests/bug70852.phpt b/ext/spl/tests/bug70852.phpt
index 463f9d1b43..5869e624d0 100644
--- a/ext/spl/tests/bug70852.phpt
+++ b/ext/spl/tests/bug70852.phpt
@@ -8,8 +8,8 @@ var_dump($y[NULL]);
var_dump($y[NULL]++);
?>
--EXPECTF--
-Notice: Undefined index: in %s on line %d
+Notice: Undefined array key "" in %s on line %d
NULL
-Notice: Undefined index: in %s on line %d
+Notice: Undefined array key "" in %s on line %d
NULL
diff --git a/ext/spl/tests/bug71204.phpt b/ext/spl/tests/bug71204.phpt
index a984690fcb..8d1c721c10 100644
--- a/ext/spl/tests/bug71204.phpt
+++ b/ext/spl/tests/bug71204.phpt
@@ -13,7 +13,7 @@ spl_autoload_register(function ($name) {
new A();
?>
--EXPECTF--
-Fatal error: Uncaught Error: Class 'A' not found in %sbug71204.php:%d
+Fatal error: Uncaught Error: Class "A" not found in %s:%d
Stack trace:
#0 {main}
thrown in %sbug71204.php on line %d
diff --git a/ext/spl/tests/bug73423.phpt b/ext/spl/tests/bug73423.phpt
index 451748e52b..e1fc312651 100644
--- a/ext/spl/tests/bug73423.phpt
+++ b/ext/spl/tests/bug73423.phpt
@@ -68,13 +68,13 @@ foreach (new \RecursiveIteratorIterator (new fooIterator ($foo)) as $bar) ;
?>
--EXPECTF--
-Fatal error: Uncaught Error: Class 'NotExists' not found in %s:%d
+Fatal error: Uncaught Error: Class "NotExists" not found in %s:%d
Stack trace:
#0 %s(%d): eval()
#1 %s(%d): fooIterator->__destruct()
#2 {main}
-Next Error: Class 'NotExists' not found in %s:%d
+Next Error: Class "NotExists" not found in %s:%d
Stack trace:
#0 %s(%d): eval()
#1 %s(%d): fooIterator->__destruct()
diff --git a/ext/spl/tests/bug73896.phpt b/ext/spl/tests/bug73896.phpt
index 18e54644a9..657f30c50d 100644
--- a/ext/spl/tests/bug73896.phpt
+++ b/ext/spl/tests/bug73896.phpt
@@ -35,4 +35,4 @@ try {
}
?>
--EXPECT--
-Exception: Class 'teException' not found
+Exception: Class "teException" not found
diff --git a/ext/spl/tests/bug74669.phpt b/ext/spl/tests/bug74669.phpt
index 6b4ceec65c..05fa4e415b 100644
--- a/ext/spl/tests/bug74669.phpt
+++ b/ext/spl/tests/bug74669.phpt
@@ -98,7 +98,7 @@ var_dump($selfArray['foo']);
0 => test1
1 => test2
-Notice: Undefined index: foo in %s on line %d
+Notice: Undefined array key "foo" in %s on line %d
NULL
object(SelfArray)#9 (1) {
["foo"]=>
diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt
index 38dfde3f03..babce8a43e 100644
--- a/ext/spl/tests/iterator_044.phpt
+++ b/ext/spl/tests/iterator_044.phpt
@@ -78,7 +78,7 @@ Exception: MyCachingIterator does not use a full cache (see CachingIterator::__c
int(0)
bool(false)
-Notice: Undefined index: 0 in %siterator_044.php on line %d
+Notice: Undefined array key "0" in %s on line %d
NULL
===1===
object(stdClass)#%d (0) {
@@ -90,31 +90,31 @@ object(MyFoo)#%d (0) {
}
bool(false)
-Notice: Undefined index: foo in %siterator_044.php on line %d
+Notice: Undefined array key "foo" in %s on line %d
NULL
===3===
NULL
bool(false)
-Notice: Undefined index: in %siterator_044.php on line %d
+Notice: Undefined array key "" in %s on line %d
NULL
===4===
int(2)
bool(false)
-Notice: Undefined index: 2 in %siterator_044.php on line %d
+Notice: Undefined array key "2" in %s on line %d
NULL
===5===
string(3) "foo"
bool(false)
-Notice: Undefined index: foo in %siterator_044.php on line %d
+Notice: Undefined array key "foo" in %s on line %d
NULL
===6===
int(3)
bool(false)
-Notice: Undefined index: 3 in %siterator_044.php on line %d
+Notice: Undefined array key "3" in %s on line %d
NULL
===FILL===
===0===
@@ -135,7 +135,7 @@ int(1)
NULL
bool(false)
-Notice: Undefined index: in %siterator_044.php on line %d
+Notice: Undefined array key "" in %s on line %d
NULL
===4===
int(2)
@@ -149,5 +149,5 @@ int(1)
int(3)
bool(false)
-Notice: Undefined index: 3 in %siterator_044.php on line %d
+Notice: Undefined array key "3" in %s on line %d
NULL
diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt
index d180d044c0..c31d0b6157 100644
--- a/ext/spl/tests/spl_004.phpt
+++ b/ext/spl/tests/spl_004.phpt
@@ -85,5 +85,5 @@ int(6)
int(4)
===ERRORS===
iterator_apply(): Argument #3 ($args) must be of type ?array, int given
-iterator_apply(): Argument #2 ($function) must be a valid callback, function 'non_existing_function' not found or invalid function name
+iterator_apply(): Argument #2 ($function) must be a valid callback, function "non_existing_function" not found or invalid function name
iterator_apply() expects at most 3 parameters, 4 given
diff --git a/ext/spl/tests/spl_autoload_001.phpt b/ext/spl/tests/spl_autoload_001.phpt
index 50c815c4ad..90e863ce69 100644
--- a/ext/spl/tests/spl_autoload_001.phpt
+++ b/ext/spl/tests/spl_autoload_001.phpt
@@ -100,4 +100,4 @@ TestFunc2(TestClass)
%stestclass.class.inc
bool(true)
===NOFUNCTION===
-spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, function 'unavailable_autoload_function' not found or invalid function name
+spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, function "unavailable_autoload_function" not found or invalid function name
diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt
index 375ba2ef5e..a460d259fb 100644
--- a/ext/spl/tests/spl_autoload_007.phpt
+++ b/ext/spl/tests/spl_autoload_007.phpt
@@ -52,7 +52,7 @@ foreach($funcs as $idx => $func)
?>
--EXPECTF--
string(22) "MyAutoLoader::notExist"
-spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist'
+spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist"
string(22) "MyAutoLoader::noAccess"
spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, cannot access protected method MyAutoLoader::noAccess()
@@ -69,7 +69,7 @@ array(2) {
[1]=>
string(8) "notExist"
}
-spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist'
+spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist"
array(2) {
[0]=>
@@ -102,7 +102,7 @@ array(2) {
[1]=>
string(8) "notExist"
}
-spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist'
+spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist"
array(2) {
[0]=>
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index ee82fa32e0..6ca3cc7d6d 100755
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2427,7 +2427,7 @@ PHP_FUNCTION(register_tick_function)
if (!zend_is_callable(&tick_fe.arguments[0], 0, &function_name)) {
efree(tick_fe.arguments);
- zend_argument_type_error(1, "must be a valid tick callback, '%s' given", ZSTR_VAL(function_name));
+ zend_argument_type_error(1, "must be a valid tick callback, \"%s\" given", ZSTR_VAL(function_name));
zend_string_release_ex(function_name, 0);
RETURN_THROWS();
} else if (function_name) {
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index d6a79e3699..9c65586f63 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -707,7 +707,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n
/* break missing intentionally */
default:
- zend_value_error("Unknown format specifier '%c'", *format);
+ zend_value_error("Unknown format specifier \"%c\"", *format);
goto fail;
}
format++;
diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
index bd5823e698..b8dfb73873 100644
--- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt
+++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt
@@ -25,5 +25,5 @@ try {
?>
--EXPECT--
*** Testing array_diff_ukey() : usage variation ***
-array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name
-array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name
+array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name
+array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name
diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt
index e5118a01e0..f5158e337c 100644
--- a/ext/standard/tests/array/array_filter_variation9.phpt
+++ b/ext/standard/tests/array/array_filter_variation9.phpt
@@ -64,6 +64,6 @@ array(7) {
[6]=>
NULL
}
-array_filter(): Argument #2 ($callback) must be a valid callback, function 'echo' not found or invalid function name
-array_filter(): Argument #2 ($callback) must be a valid callback, function 'exit' not found or invalid function name
+array_filter(): Argument #2 ($callback) must be a valid callback, function "echo" not found or invalid function name
+array_filter(): Argument #2 ($callback) must be a valid callback, function "exit" not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
index 734564e0e3..71126a1edd 100644
--- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
+++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt
@@ -25,5 +25,5 @@ try {
?>
--EXPECT--
*** Testing array_intersect_ukey() : usage variation ***
-array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name
-array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name
+array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name
+array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name
diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt
index 4e97270b64..53524fc819 100644
--- a/ext/standard/tests/array/array_map_object2.phpt
+++ b/ext/standard/tests/array/array_map_object2.phpt
@@ -39,7 +39,7 @@ echo "Done";
--EXPECT--
*** Testing array_map() : with non-existent class and method ***
-- with non-existent class --
-array_map(): Argument #1 ($callback) must be a valid callback, class 'non-existent' not found
+array_map(): Argument #1 ($callback) must be a valid callback, class "non-existent" not found
-- with existent class and non-existent method --
-array_map(): Argument #1 ($callback) must be a valid callback, class 'SimpleClass' does not have a method 'non-existent'
+array_map(): Argument #1 ($callback) must be a valid callback, class SimpleClass does not have a method "non-existent"
Done
diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt
index 11b56a6723..b5528c9e7c 100644
--- a/ext/standard/tests/array/array_map_object3.phpt
+++ b/ext/standard/tests/array/array_map_object3.phpt
@@ -76,7 +76,7 @@ array(3) {
int(7)
}
-- accessing child method from parent class --
-array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild'
+array_map(): Argument #1 ($callback) must be a valid callback, class ParentClass does not have a method "staticChild"
-- accessing parent method using child class object --
array(3) {
[0]=>
@@ -87,5 +87,5 @@ array(3) {
int(7)
}
-- accessing child method using parent class object --
-array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild'
+array_map(): Argument #1 ($callback) must be a valid callback, class ParentClass does not have a method "staticChild"
Done
diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt
index 69eaf2e3d7..1c4f3b23a1 100644
--- a/ext/standard/tests/array/array_map_variation12.phpt
+++ b/ext/standard/tests/array/array_map_variation12.phpt
@@ -44,5 +44,5 @@ array(3) {
-- with built-in function 'pow' and one parameter --
pow() expects exactly 2 parameters, 1 given
-- with language construct --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "echo" not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt
index e51fb0b381..2670537b46 100644
--- a/ext/standard/tests/array/array_map_variation14.phpt
+++ b/ext/standard/tests/array/array_map_variation14.phpt
@@ -118,7 +118,7 @@ array(2) {
int(2)
}
-- with empty string --
-array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name
-- with empty array --
array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members
Done
diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt
index d8f5747ab4..f10be3cc32 100644
--- a/ext/standard/tests/array/array_map_variation15.phpt
+++ b/ext/standard/tests/array/array_map_variation15.phpt
@@ -23,5 +23,5 @@ echo "Done";
?>
--EXPECT--
*** Testing array_map() : non existent 'callback' function ***
-array_map(): Argument #1 ($callback) must be a valid callback, function 'non_existent' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "non_existent" not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt
index 4d13691ade..21034375b9 100644
--- a/ext/standard/tests/array/array_map_variation16.phpt
+++ b/ext/standard/tests/array/array_map_variation16.phpt
@@ -38,19 +38,19 @@ echo "Done";
--EXPECT--
*** Testing array_map() : non-permmited built-in functions ***
-- Iteration 1 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "echo" not found or invalid function name
-- Iteration 2 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'array' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "array" not found or invalid function name
-- Iteration 3 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'empty' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "empty" not found or invalid function name
-- Iteration 4 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'eval' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "eval" not found or invalid function name
-- Iteration 5 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'exit' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "exit" not found or invalid function name
-- Iteration 6 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'isset' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "isset" not found or invalid function name
-- Iteration 7 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'list' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "list" not found or invalid function name
-- Iteration 8 --
-array_map(): Argument #1 ($callback) must be a valid callback, function 'print' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "print" not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt
index 3a547d67ef..a3aeb9f22a 100644
--- a/ext/standard/tests/array/array_map_variation17.phpt
+++ b/ext/standard/tests/array/array_map_variation17.phpt
@@ -115,10 +115,10 @@ array_map(): Argument #1 ($callback) must be a valid callback, no array or strin
array_map(): Argument #1 ($callback) must be a valid callback, no array or string given
-- Iteration 14 --
-array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name
-- Iteration 15 --
-array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name
+array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name
-- Iteration 16 --
array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members
diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
index f26cf1b1fd..8002957e7e 100644
--- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt
@@ -35,5 +35,5 @@ bool(true)
-- With 'min' built-in function --
bool(true)
-- With 'echo' language construct --
-array_walk_recursive(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name
+array_walk_recursive(): Argument #2 ($funcname) must be a valid callback, function "echo" not found or invalid function name
Done
diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt
index d855429c28..2186bb6402 100644
--- a/ext/standard/tests/array/array_walk_variation8.phpt
+++ b/ext/standard/tests/array/array_walk_variation8.phpt
@@ -35,5 +35,5 @@ bool(true)
-- With 'min' built-in function --
bool(true)
-- With 'echo' language construct --
-array_walk(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name
+array_walk(): Argument #2 ($funcname) must be a valid callback, function "echo" not found or invalid function name
Done
diff --git a/ext/standard/tests/filters/object_init_failure.phpt b/ext/standard/tests/filters/object_init_failure.phpt
index 6375969e03..3a88d87cca 100644
--- a/ext/standard/tests/filters/object_init_failure.phpt
+++ b/ext/standard/tests/filters/object_init_failure.phpt
@@ -16,4 +16,4 @@ try {
Warning: file_get_contents(): Unable to create or locate filter "sample.filter" in %s on line %d
Warning: file_get_contents(): Unable to create filter (sample.filter) in %s on line %d
-Undefined constant 'FOO'
+Undefined constant "FOO"
diff --git a/ext/standard/tests/filters/object_init_failure_2.phpt b/ext/standard/tests/filters/object_init_failure_2.phpt
index 251ebf519c..32473bc831 100644
--- a/ext/standard/tests/filters/object_init_failure_2.phpt
+++ b/ext/standard/tests/filters/object_init_failure_2.phpt
@@ -16,4 +16,4 @@ try {
Warning: main(): Unable to create or locate filter "sample.filter" in %s on line %d
Warning: main(): Unable to create filter (sample.filter) in %s on line %d
-Undefined constant 'FOO'
+Undefined constant "FOO"
diff --git a/ext/standard/tests/general_functions/bug72920.phpt b/ext/standard/tests/general_functions/bug72920.phpt
index 24a8724904..cee43561de 100644
--- a/ext/standard/tests/general_functions/bug72920.phpt
+++ b/ext/standard/tests/general_functions/bug72920.phpt
@@ -13,4 +13,4 @@ try {
}
?>
--EXPECT--
-Cannot access private const Foo::C1
+Cannot access private constant Foo::C1
diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt
index 67afab6345..a1c5b4cdec 100644
--- a/ext/standard/tests/general_functions/callbacks_001.phpt
+++ b/ext/standard/tests/general_functions/callbacks_001.phpt
@@ -106,4 +106,4 @@ O
$this|O::who
O
$this|B::who
-call_user_func(): Argument #1 ($function) must be a valid callback, class 'P' is not a subclass of 'B'
+call_user_func(): Argument #1 ($function) must be a valid callback, class P is not a subclass of B
diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt
index f69a886ad3..220896df67 100644
--- a/ext/standard/tests/general_functions/callbacks_002.phpt
+++ b/ext/standard/tests/general_functions/callbacks_002.phpt
@@ -21,6 +21,6 @@ try {
?>
--EXPECT--
-call_user_func(): Argument #1 ($function) must be a valid callback, class 'Foo' not found
+call_user_func(): Argument #1 ($function) must be a valid callback, class "Foo" not found
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object
call_user_func(): Argument #1 ($function) must be a valid callback, second array member is not a valid method
diff --git a/ext/standard/tests/general_functions/register_tick_function_error.phpt b/ext/standard/tests/general_functions/register_tick_function_error.phpt
index c44dbe0872..82564a83b4 100644
--- a/ext/standard/tests/general_functions/register_tick_function_error.phpt
+++ b/ext/standard/tests/general_functions/register_tick_function_error.phpt
@@ -11,4 +11,4 @@ try {
}
?>
--EXPECT--
-register_tick_function(): Argument #1 ($function) must be a valid tick callback, 'a' given
+register_tick_function(): Argument #1 ($function) must be a valid tick callback, "a" given
diff --git a/ext/standard/tests/serialize/max_depth.phpt b/ext/standard/tests/serialize/max_depth.phpt
index 79ab13e9f1..312f22226c 100644
--- a/ext/standard/tests/serialize/max_depth.phpt
+++ b/ext/standard/tests/serialize/max_depth.phpt
@@ -104,8 +104,8 @@ var_dump(is_array(unserialize(
?>
--EXPECTF--
Invalid max_depth:
-unserialize(): 'max_depth' option must be of type int, string given
-unserialize(): 'max_depth' option must be greater than or equal to 0
+unserialize(): "max_depth" option must be of type int, string given
+unserialize(): "max_depth" option must be greater than or equal to 0
Array:
bool(true)
diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt
index ab77ece334..ce9ad53f7a 100644
--- a/ext/standard/tests/serialize/serialization_objects_002.phpt
+++ b/ext/standard/tests/serialize/serialization_objects_002.phpt
Binary files differ
diff --git a/ext/standard/tests/streams/bug77664.phpt b/ext/standard/tests/streams/bug77664.phpt
index 01722033b5..4d9a2e0cb2 100644
--- a/ext/standard/tests/streams/bug77664.phpt
+++ b/ext/standard/tests/streams/bug77664.phpt
@@ -10,7 +10,7 @@ stream_wrapper_register('error',ErrorWrapper::class);
file_get_contents('error://test');
?>
--EXPECTF--
-Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in %sbug77664.php:%d
+Fatal error: Uncaught Error: Undefined constant self::INVALID in %s:%d
Stack trace:
#0 %sbug77664.php(%d): file_get_contents('error://test')
#1 {main}
diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt
index 9d0b88e121..d77dd71c36 100644
--- a/ext/standard/tests/strings/printf.phpt
+++ b/ext/standard/tests/strings/printf.phpt
@@ -683,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum
12345678900.00000000000000000000000000000000000000000000000000000
*** Output for invalid width(-15) specifier ***
-Unknown format specifier '-'
+Unknown format specifier "-"
*** Output for '%F' as the format parameter ***
12345678900.000000
diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt
index 2990bd8570..b0e364b9c9 100644
--- a/ext/standard/tests/strings/printf_64bit.phpt
+++ b/ext/standard/tests/strings/printf_64bit.phpt
@@ -683,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum
12345678900.0000000000%d
*** Output for invalid width(-15) specifier ***
-Unknown format specifier '-'
+Unknown format specifier "-"
*** Output for '%F' as the format parameter ***
12345678900.000000
diff --git a/ext/standard/tests/strings/sprintf_variation52.phpt b/ext/standard/tests/strings/sprintf_variation52.phpt
index f41d7a182c..e7e022a6fa 100644
--- a/ext/standard/tests/strings/sprintf_variation52.phpt
+++ b/ext/standard/tests/strings/sprintf_variation52.phpt
@@ -50,7 +50,7 @@ Notice: sprintf(): Requested precision of 988 digits was truncated to PHP maximu
string(65) "12345678900.00000000000000000000000000000000000000000000000000000"
-- Testing for invalid width(-15) specifier --
-Unknown format specifier '-'
+Unknown format specifier "-"
-- Testing for '%X' as the format parameter --
string(1) "C"
diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt
index 0f29541689..703bc73ad8 100644
--- a/ext/standard/tests/strings/vfprintf_error3.phpt
+++ b/ext/standard/tests/strings/vfprintf_error3.phpt
@@ -49,5 +49,5 @@ unlink( $file );
-- Testing vfprintf() function with wrong variable types as argument --
vfprintf(): Argument #2 ($format) must be of type string, array given
vfprintf(): Argument #3 ($args) must be of type array, string given
-Unknown format specifier 'y'
+Unknown format specifier "y"
string(0) ""
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index e6c87169af..93d4144721 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -415,7 +415,7 @@ static void php_stream_bucket_attach(int append, INTERNAL_FUNCTION_PARAMETERS)
ZEND_PARSE_PARAMETERS_END();
if (NULL == (pzbucket = zend_hash_str_find(Z_OBJPROP_P(zobject), "bucket", sizeof("bucket")-1))) {
- zend_argument_value_error(2, "must be an object that has a 'bucket' property");
+ zend_argument_value_error(2, "must be an object that has a \"bucket\" property");
RETURN_THROWS();
}
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 7a868434fd..d64d5f23f1 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -1229,11 +1229,11 @@ PHP_FUNCTION(unserialize)
max_depth = zend_hash_str_find_deref(Z_ARRVAL_P(options), "max_depth", sizeof("max_depth") - 1);
if (max_depth) {
if (Z_TYPE_P(max_depth) != IS_LONG) {
- zend_type_error("unserialize(): 'max_depth' option must be of type int, %s given", zend_zval_type_name(max_depth));
+ zend_type_error("unserialize(): \"max_depth\" option must be of type int, %s given", zend_zval_type_name(max_depth));
goto cleanup;
}
if (Z_LVAL_P(max_depth) < 0) {
- zend_value_error("unserialize(): 'max_depth' option must be greater than or equal to 0");
+ zend_value_error("unserialize(): \"max_depth\" option must be greater than or equal to 0");
goto cleanup;
}
diff --git a/ext/tidy/tests/035.phpt b/ext/tidy/tests/035.phpt
index 1fe0d5c9f1..720e095f75 100644
--- a/ext/tidy/tests/035.phpt
+++ b/ext/tidy/tests/035.phpt
@@ -9,7 +9,7 @@ tidyNode::__construct()
new tidyNode;
?>
--EXPECTF--
-Fatal error: Uncaught Error: Call to private tidyNode::__construct() from invalid context in %s:%d
+Fatal error: Uncaught Error: Call to private tidyNode::__construct() from global scope in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/ext/tokenizer/tests/PhpToken_extension_errors.phpt b/ext/tokenizer/tests/PhpToken_extension_errors.phpt
index 89604a9051..d2bee1bc8f 100644
--- a/ext/tokenizer/tests/PhpToken_extension_errors.phpt
+++ b/ext/tokenizer/tests/PhpToken_extension_errors.phpt
@@ -26,5 +26,5 @@ try {
?>
--EXPECT--
-Undefined constant 'UNKNOWN'
+Undefined constant "UNKNOWN"
Cannot instantiate abstract class MyPhpToken2
diff --git a/ext/zlib/tests/005.phpt b/ext/zlib/tests/005.phpt
index da81c48c73..6b0be2897d 100644
--- a/ext/zlib/tests/005.phpt
+++ b/ext/zlib/tests/005.phpt
@@ -44,7 +44,7 @@ var_dump(gzuncompress($data2));
?>
--EXPECTF--
-Compression level (1000) must be within -1..9
+gzcompress(): Argument #2 ($level) must be between -1 and 9
string(%d) "%a"
string(%d) "%a"
string(%d) "%a"
@@ -53,7 +53,7 @@ string(%d) "%a"
Warning: gzuncompress(): %s error in %s on line %d
bool(false)
-Length (-1) must be greater or equal zero
+gzuncompress(): Argument #2 ($max_decoded_len) must be greater than or equal to 0
Warning: gzuncompress(): %s error in %s on line %d
bool(false)
diff --git a/ext/zlib/tests/006.phpt b/ext/zlib/tests/006.phpt
index 32965ea65a..692759e886 100644
--- a/ext/zlib/tests/006.phpt
+++ b/ext/zlib/tests/006.phpt
@@ -42,7 +42,7 @@ var_dump(gzinflate($data2));
?>
--EXPECTF--
-Compression level (1000) must be within -1..9
+gzcompress(): Argument #2 ($level) must be between -1 and 9
string(%d) "%a"
string(%d) "%a"
string(%d) "%a"
@@ -54,7 +54,7 @@ bool(false)
Warning: gzinflate(): data error in %s on line %d
bool(false)
-Length (-1) must be greater or equal zero
+gzinflate(): Argument #2 ($max_decoded_len) must be greater than or equal to 0
Warning: gzinflate(): data error in %s on line %d
bool(false)
diff --git a/ext/zlib/tests/007.phpt b/ext/zlib/tests/007.phpt
index f51d0d3fc5..b9255557ff 100644
--- a/ext/zlib/tests/007.phpt
+++ b/ext/zlib/tests/007.phpt
@@ -40,11 +40,11 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE));
?>
--EXPECTF--
-Compression level (-10) must be within -1..9
-Compression level (100) must be within -1..9
-Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
+gzencode(): Argument #2 ($level) must be between -1 and 9
+gzencode(): Argument #2 ($level) must be between -1 and 9
+gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
string(%d) "%a"
string(%d) "%a"
-Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
+gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
string(%d) "%a"
string(%d) "%a"
diff --git a/ext/zlib/tests/gzcompress_error1.phpt b/ext/zlib/tests/gzcompress_error1.phpt
index c63df4347c..e559030151 100644
--- a/ext/zlib/tests/gzcompress_error1.phpt
+++ b/ext/zlib/tests/gzcompress_error1.phpt
@@ -38,7 +38,7 @@ try {
*** Testing gzcompress() : error conditions ***
-- Testing with incorrect compression level --
-Compression level (99) must be within -1..9
+gzcompress(): Argument #2 ($level) must be between -1 and 9
-- Testing with invalid encoding --
-Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
+gzcompress(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt
index f229b353ed..fbcb2d95f3 100644
--- a/ext/zlib/tests/gzdeflate_error1.phpt
+++ b/ext/zlib/tests/gzdeflate_error1.phpt
@@ -38,7 +38,7 @@ try {
*** Testing gzdeflate() : error conditions ***
-- Testing with incorrect compression level --
-Compression level (99) must be within -1..9
+gzdeflate(): Argument #2 ($level) must be between -1 and 9
-- Testing with incorrect encoding --
-Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
+gzdeflate(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
diff --git a/ext/zlib/tests/gzencode_error1.phpt b/ext/zlib/tests/gzencode_error1.phpt
index 062497ef11..5d850e5438 100644
--- a/ext/zlib/tests/gzencode_error1.phpt
+++ b/ext/zlib/tests/gzencode_error1.phpt
@@ -39,7 +39,7 @@ try {
*** Testing gzencode() : error conditions ***
-- Testing with incorrect compression level --
-Compression level (99) must be within -1..9
+gzencode(): Argument #2 ($level) must be between -1 and 9
-- Testing with incorrect encoding_mode --
-Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE
+gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index eee9786e88..6ddda3d7a2 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -716,7 +716,7 @@ PHP_FUNCTION(name) \
} \
} \
if (level < -1 || level > 9) { \
- zend_value_error("Compression level (" ZEND_LONG_FMT ") must be within -1..9", level); \
+ zend_argument_value_error(default_encoding ? 2 : 3, "must be between -1 and 9"); \
RETURN_THROWS(); \
} \
switch (encoding) { \
@@ -725,7 +725,7 @@ PHP_FUNCTION(name) \
case PHP_ZLIB_ENCODING_DEFLATE: \
break; \
default: \
- zend_value_error("Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE"); \
+ zend_argument_value_error(default_encoding ? 3 : 2, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \
RETURN_THROWS(); \
} \
if ((out = php_zlib_encode(ZSTR_VAL(in), ZSTR_LEN(in), encoding, level)) == NULL) { \
@@ -745,7 +745,7 @@ PHP_FUNCTION(name) \
RETURN_THROWS(); \
} \
if (max_len < 0) { \
- zend_value_error("Length (" ZEND_LONG_FMT ") must be greater or equal zero", max_len); \
+ zend_argument_value_error(2, "must be greater than or equal to 0"); \
RETURN_THROWS(); \
} \
if (SUCCESS != php_zlib_decode(in_buf, in_len, &out_buf, &out_len, encoding, max_len)) { \