- ini_set: documentation ( source)
- error_reporting: documentation ( source)
- current: documentation ( source)
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
$array = [1,2,3];
foreach($array as &$val) {
echo "{$val} - ", current($array), PHP_EOL;
}