I'm making a program in a team of programmers and it has been decided that for a specific system we'll be using an array. In the majority of the uses, all indexes in the array will be properly set still, undefined indexes can happen. Using isset() or array_key_exists() will make the code too slow (because we will need lots of if's and and if is slow) and too "dirty" (too much code and repetitive code) so both are not an option. I already spotted the set_error_handler() function but I also don't know if it's the best option.
Primary objective: When that specific array causes a undefined index it must be caught, solved (write situation to the logs) and the script must continue like nothing happened. What's the best way to do that?
NOTE: If any other error or warning happens I want PHP to treat it like it's used to, I only want this stuff made to that specific array with that name.
I hope I was clear enugh