<?php class Test { public $a; public int $b; } $test = new Test; foreach ($test as $prop => &$value) { $value = 42; } var_dump($test);
You have javascript disabled. You will not be able to edit any code.