xref: /PHP-5.6/tests/lang/foreachLoop.006.phpt (revision 176012df)
1--TEST--
2Foreach loop tests - error case: key is a reference.
3--FILE--
4<?php
5$a = array("a","b","c");
6foreach ($a as &$k=>$v) {
7  var_dump($v);
8}
9?>
10--EXPECTF--
11Fatal error: Key element cannot be a reference in %s on line 3