1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/spl/tests/bug70852.phpt
Nikita Popov c48b745f00 Promote "undefined array key" notice to warning
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.

Closes GH-5927.
2020-08-03 14:40:50 +02:00

16 lines
273 B
PHP

--TEST--
Bug #70852 Segfault getting NULL offset of an ArrayObject
--FILE--
<?php
$y = new ArrayObject();
var_dump($y[NULL]);
var_dump($y[NULL]++);
?>
--EXPECTF--
Warning: Undefined array key "" in %s on line %d
NULL
Warning: Undefined array key "" in %s on line %d
NULL