========================================
- Core:
+ . Trying to use values of type null, bool, int, float or resource as an
+ array (such as $null["key"]) will now generate a notice. This does not
+ affect array accesses performed by list().
. get_declared_classes() no longer returns anonymous classes that haven't
been instantiated yet.
. "fn" is now a reserved keyword. In particular it can no longer be used as a
. Passing the result of a (non-reference) list() assignment by reference is
consistently disallowed now. Previously this worked if the right hand side
was a simple (CV) variable and did not occur as part of the list().
- . Added --ini-path and --ini-dir options to php-config.
- BCMath:
. BCMath functions will now warn if a non well-formed number is passed, such
PHP_LDAP_LFLAGS, PHP_LDAP_INCLUDE, PHP_LDAP_LIBS.
b. Unix build system changes
+ - Added --ini-path and --ini-dir options to php-config.
- configure --help now also outputs --program-suffix and --program-prefix
information by using the Autoconf AC_ARG_PROGRAM macro.
- Obsolescent macros AC_FUNC_VPRINTF and AC_FUNC_UTIME_NULL have been
?>
--EXPECTF--
Notice: Undefined variable: a in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
-Notice: Undefined variable: %s in %s on line %d
+Notice: Undefined variable: a in %s on line %d
+
+Notice: Undefined variable: c in %s on line %d
-Notice: Undefined variable: %s in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
Notice: Undefined variable: a in %s on line %d
int(1)
-Notice: Undefined variable: %s in %s on line %d
+Notice: Undefined variable: a in %s on line %d
-Notice: Undefined variable: %s in %s on line %d
+Notice: Undefined variable: b in %s on line %d
int(0)
Notice: Undefined variable: a in %s on line %d
Notice: Undefined variable: c in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Trying to get property '1' of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
--EXPECTF--
Notice: Undefined variable: arr in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Undefined variable: arr in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Undefined variable: arr in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Trying to get property 'foo' of non-object in %s on line %d
Warning: Creating default object from empty value in %s on line %d
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Notice: Trying to access array offset on value of type float in %s on line %d
NULL
NULL
Done
--EXPECTF--
Notice: Undefined offset: 0 in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Warning: Parameter 1 to foo() expected to be a reference, value given in %s on line %d
array(0) {
}
int(5)
}
int(1)
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Notice: Undefined offset: 4 in %s on line %d
?>
--EXPECTF--
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
?>
--EXPECTF--
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Trying to get property 'a' of non-object in %s on line %d
NULL
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Trying to get property 'b' of non-object in %s on line %d
NULL
Notice: Undefined variable: d in %s on line %d
+Notice: Trying to access array offset on value of type null in %s on line %d
+
Notice: Trying to get property '' of non-object in %s on line %d
bool(false)
bool(true)
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type bool in %s on line %d
NULL
Done
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type int in %s on line %d
NULL
Done
echo "Done\n";
?>
---EXPECT--
+--EXPECTF--
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
+
+Notice: Trying to access array offset on value of type null in %s on line %d
NULL
Done
}
} else {
if (type != BP_VAR_IS && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- ZVAL_UNDEFINED_OP1();
+ container = ZVAL_UNDEFINED_OP1();
}
if (/*dim_type == IS_CV &&*/ UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
ZVAL_UNDEFINED_OP2();
}
+ if (!is_list && type != BP_VAR_IS) {
+ zend_error(E_NOTICE, "Trying to access array offset on value of type %s",
+ zend_zval_type_name(container));
+ }
ZVAL_NULL(result);
}
}
var_dump($test, $test3['mmmmm']);
?>
--EXPECTF--
-Notice: Undefined variable: test3 in %s%earray_026.php on line %d
-object(ArrayObject)#%d (1) {
+Notice: Undefined variable: test3 in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
+object(ArrayObject)#1 (1) {
["storage":"ArrayObject":private]=>
array(1) {
["d1"]=>
NULL
Notice: Undefined variable: c in %sbug62978.php on line %d
+
+Notice: 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
?>
--EXPECTF--
Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
+
+Notice: Trying to access array offset on value of type null in %sbug31158.php on line 6
ok
?>
--EXPECT--
Undefined variable: data
+Trying to access array offset on value of type null
Undefined index here: ''
--EXPECTF--
Passing undefined by value
-Notice: Undefined variable: undef1 in %s on line 13
+Notice: Undefined variable: undef1 in %s on line %d
+
+Notice: Trying to access array offset on value of type null in %s on line %d
Inside passbyVal call:
NULL
After call
-Notice: Undefined variable: undef1 in %s on line 15
+Notice: Undefined variable: undef1 in %s on line %d
NULL
Passing undefined by reference