Arquivos
hhvm/hphp/test/slow/array_iterator/444.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

14 linhas
251 B
PHP

<?php
$a = array(1, 2, 3);
foreach ($a as $k1 => &$v1) { $v1 += $k1; }
var_dump($a);
$a = array(1, 2, 3);
for ($o = new MutableArrayIterator($a); $o->valid(); $o->next()) {
$k2 = $o->key();
$v2 = &$o->currentRef();
$v2 += $k2;
}
var_dump($a);