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

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

update php

File size: 371 bytes
Line 
1--TEST--
2Bug #71266 (Missing separation of properties HT in foreach etc)
3--FILE--
4<?php
5$one = 1;
6$two = 2;
7$arr = ['foo' => $one, 'bar' => $two];
8$obj = (object) $arr;
9foreach ($obj as $val) {
10    var_dump($val);
11    $obj->bar = 42;
12}
13
14$arr = ['foo' => $one, 'bar' => $two];
15$obj = (object) $arr;
16next($obj);
17var_dump(current($arr));
18?>
19--EXPECT--
20int(1)
21int(42)
22int(1)
Note: See TracBrowser for help on using the repository browser.