This is an error 404
There are `0` results
preferences:
145.24 ms | 1398 KiB | 7 Q<?php
class Object {
public $foo = 'public';
protected $bar = 'bar';
public function doLoopInternally() {
echo '------Iterating Internally-------' . \PHP_EOL;
foreach($this as $prop => $val) {
echo $prop, ':', $val, \PHP_EOL;
}
}
}
echo '------Iterating Externally-------' . \PHP_EOL;
$obj = new Object();
foreach($obj as $prop => $val) {
echo $prop, ':', $val, \PHP_EOL;
}