strtr()
function strtr(string $string, array|string $from, ?string $to = null): string
Translates bytes pairwise, or applies longest-match-first replacement pairs.
Parameters:
$string(string)$from(array|string)$to(?string), defaultnull, optional
Returns: string
Availability
| Compiled (AOT) | Magician (eval) |
|---|---|
| Available | Available |
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how strtr is implemented in the compiler, see the internals page.