Function __global->stristr

Definitions

sources_custom/phpstub.php

  • Case-insensitive strstr.
  • 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
$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

  • All of haystack from the first occurrence of needle to the end
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Case-insensitive strstr.
 *
 * @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 All of haystack from the first occurrence of needle to the end
 */

function stristr(string $haystack, string $needle, bool $before_needle = false) : string