1--TEST--
2Test nullsafe as foreach target
3--FILE--
4<?php
5
6$foo = null;
7foreach ([1, 2, 3] as $foo?->bar) {}
8
9?>
10--EXPECTF--
11Fatal error: Can't use nullsafe operator in write context in %s.php on line 4
12