Function __global->strtr
Definitions
sources_custom/phpstub.php
- Translate certain characters.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $string | string | No | No | required parameter | N/A | N/A | Subject |
| $replace_pairs | mixed | No | No | required parameter | N/A | N/A | Map of translations to do OR from string |
| $to | ?mixed | No | No | Null | N/A | N/A | To string (null: previous parameter was a map) |
Returns
- Result
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Translate certain characters.
*
* @param string $string Subject
* @param mixed $replace_pairs Map of translations to do OR from string
* @param ?mixed $to To string (null: previous parameter was a map)
* @return string Result
*/
function strtr(string $string, $replace_pairs, $to = null) : string
* Translate certain characters.
*
* @param string $string Subject
* @param mixed $replace_pairs Map of translations to do OR from string
* @param ?mixed $to To string (null: previous parameter was a map)
* @return string Result
*/
function strtr(string $string, $replace_pairs, $to = null) : string

