Function __global->strstr
Definitions
sources_custom/phpstub.php
- Find first occurrence of a string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
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 |
| $before_needle | boolean | No | No | False | N/A | N/A | The part of the haystack before the first occurrence of the needle (excluding the needle) |
Returns
- The answer (false: does not occur)
- Type: ~string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find first occurrence of a string.
*
* @param string $haystack Haystack
* @param string $needle Needle
* @param boolean $before_needle The part of the haystack before the first occurrence of the needle (excluding the needle)
* @return ~string The answer (false: does not occur)
*/
function strstr(string $haystack, string $needle, bool $before_needle = false)
* Find first occurrence of a string.
*
* @param string $haystack Haystack
* @param string $needle Needle
* @param boolean $before_needle The part of the haystack before the first occurrence of the needle (excluding the needle)
* @return ~string The answer (false: does not occur)
*/
function strstr(string $haystack, string $needle, bool $before_needle = false)

