summaryrefslogtreecommitdiff
path: root/Zend/tests/list_assign_ref_string_offset_error.phpt
blob: c4e99d01a2f9436dc4c1970bdf20d35821b3ecac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
String offset error during list() by-ref assignment
--FILE--
<?php

$a = [0];
$v = 'b';
$i = 0;
list(&$a[$i++]) = $v;

?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d