mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

This implements the last remaining part of the https://wiki.php.net/rfc/engine_warnings RFC. Closes GH-5927.
21 lines
416 B
PHP
21 lines
416 B
PHP
--TEST--
|
|
Ensure "undefined offset" notice formats message correctly when undefined key is negative
|
|
--FILE--
|
|
<?php
|
|
|
|
[][-1];
|
|
[][-1.1];
|
|
(new ArrayObject)[-1];
|
|
(new ArrayObject)[-1.1];
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined array key -1 in %s on line %d
|
|
|
|
Warning: Undefined array key -1 in %s on line %d
|
|
|
|
Warning: Undefined array key -1 in %s on line %d
|
|
|
|
Warning: Undefined array key -1 in %s on line %d
|
|
Done
|