- var_dump: documentation ( source)
<?php
class Foo {
public $bar = array('x' => array('a' => 'x1', 'b' => 'x2'), 'y' => array('a' => 'y1', 'b' => 'y2'));
public function test() {
foreach ($this->bar as $b => $c) {
$b['a'] = 'hello';
}
}
}
$foo = new Foo();
$foo->test();
var_dump($foo->bar);