- Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- Failed at value test
<?php
final class DemoFile
{
public function run(array $data): void
{
try {
foreach ($data as $key => $val) {
throw new \Exception('test');
}
} catch (\Throwable) {
echo 'Failed at value '.$val;
}
}
}
$d = new DemoFile();
$d->run(['test']);