mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
6144da7e35
is pretty non-intuitive. If the same value was 1 or true you get a warning and it halts. Since we can't break BC completely (yet) lets bump this from E_STRICT. Also added a new section to UPGRADING for engine changes. <?php $x = ''; // $x = null; // $x = false; $x->baz = 1; var_dump($x); $y = 1; $y->baz = 1; var_dump($y);
32 lines
571 B
PHP
32 lines
571 B
PHP
--TEST--
|
|
Using undefined multidimensional array
|
|
--FILE--
|
|
<?php
|
|
|
|
$arr[1][2][3][4][5];
|
|
|
|
echo $arr[1][2][3][4][5];
|
|
|
|
$arr[1][2][3][4][5]->foo;
|
|
|
|
$arr[1][2][3][4][5]->foo = 1;
|
|
|
|
$arr[][] = 2;
|
|
|
|
$arr[][]->bar = 2;
|
|
|
|
?>
|
|
--EXPECTF--
|
|
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Undefined variable: arr in %s on line %d
|
|
|
|
Notice: Trying to get property of non-object in %s on line %d
|
|
|
|
Warning: Creating default object from empty value in %s on line %d
|
|
|
|
Warning: Creating default object from empty value in %s on line %d
|