1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 00:32:23 +01:00
Files
archived-php-src/Zend/tests/array_offset.phpt

22 lines
400 B
PHP

--TEST--
Ensure "undefined offset" notice formats message corectly when undefined key is negative
--FILE--
<?php
[][-1];
[][-1.1];
(new ArrayObject)[-1];
(new ArrayObject)[-1.1];
echo "Done\n";
?>
--EXPECTF--
Notice: Undefined offset: -1 in %s on line 3
Notice: Undefined offset: -1 in %s on line 4
Notice: Undefined offset: -1 in %s on line 5
Notice: Undefined offset: -1 in %s on line 6
Done