Function __global->strrchr
Definitions
sources_custom/phpstub.php
- Find the last occurrence of a character in a string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $haystack | string | No | No | required parameter | N/A | N/A | Haystack |
| $needle | string | No | No | required parameter | N/A | N/A | Needle (string of length 1) |
Returns
- The portion of haystack which starts at the last occurrence of needle and goes until the end of haystack
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find the last occurrence of a character in a string.
*
* @param string $haystack Haystack
* @param string $needle Needle (string of length 1)
* @return string The portion of haystack which starts at the last occurrence of needle and goes until the end of haystack
*/
function strrchr(string $haystack, string $needle) : string
* Find the last occurrence of a character in a string.
*
* @param string $haystack Haystack
* @param string $needle Needle (string of length 1)
* @return string The portion of haystack which starts at the last occurrence of needle and goes until the end of haystack
*/
function strrchr(string $haystack, string $needle) : string

