mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7aacc705d0
Closes GH-5958
12 lines
201 B
PHP
12 lines
201 B
PHP
--TEST--
|
|
Test nullsafe as foreach target
|
|
--FILE--
|
|
<?php
|
|
|
|
$foo = null;
|
|
foreach ([1, 2, 3] as $foo?->bar) {}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Can't use nullsafe operator in write context in %s.php on line 4
|