1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/Zend/tests/unset_cv06.phpt
T
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

23 lines
411 B
PHP

--TEST--
unset() CV 6 (indirect unset() of global variable in session_unset())
--SKIPIF--
<?php include(__DIR__.'/../../ext/session/tests/skipif.inc'); ?>
--INI--
session.auto_start=0
session.save_handler=files
--FILE--
<?php
session_start();
$_SESSION['x'] = "1\n";
echo $_SESSION['x'];
session_unset();
echo $_SESSION['x'];
echo "ok\n";
?>
--EXPECTF--
1
Warning: Undefined array key "x" in %s on line %d
ok