source: src/router/php7/Zend/tests/bug73792.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 398 bytes
Line 
1--TEST--
2Bug #73792 (invalid foreach loop hangs script)
3--FILE--
4<?php
5$a = 'aaa';
6
7foreach ($a['bbb'] as &$value) {
8        echo 'loop';
9}
10
11unset($value);
12echo 'done';
13?>
14--EXPECTF--
15Warning: Illegal string offset 'bbb' in %sbug73792.php on line 4
16
17Fatal error: Uncaught Error: Cannot iterate on string offsets by reference in %sbug73792.php:4
18Stack trace:
19#0 {main}
20  thrown in %sbug73792.php on line 4
Note: See TracBrowser for help on using the repository browser.