strtr()
Ananya only reaches for strtr() when a strtr dry-run has to stay correct in a viva board.
Do strtr() once by hand. one strtr step Ananya can write from memory. Change one input. Say the new result out loud.
Without strtr(), a viva board gets messy and a strtr dry-run is hard to trust.
Use strtr() when a strtr dry-run must stay clear. If a simpler PHP step works, use that instead.
Don’t do this with strtr() — copy-pasting strtr without a dry-run. Interviewers spot it in ten seconds.
Place strtr() next to nearby PHP work — one strtr step Ananya can write from memory is the link.
Close strtr() with — “If I skip it, a strtr dry-run goes wrong like this: copy-pasting strtr without a dry-run.”
Board: a strtr dry-run. Dry-run strtr(). Name the trap: copy-pasting strtr without a dry-run.