summaryrefslogtreecommitdiff
path: root/Zend/tests/array_offset.phpt
blob: 76c25f92987c2fafe11aff524925fe0cef24d13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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