strstr
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the first occurrence of a string
Alias
strchr
strstr
(
string $haystack
,
string $needle
,
bool $before_needle
=
false
):
string
|
false
laravel/framework
if (
$position
!==
false
) {
$header
=
substr
(
$header
,
$position
+
7
);
return
str_contains
(
$header
,
','
) ?
strstr
(
$header
,
','
,
true
) :
$header
;
}
}
src/Illuminate/Http/Concerns/InteractsWithInput.php
laravel/framework
return
$subject
;
}
$result
=
strstr
(
$subject
, (string)
$search
,
true
);
return
$result
===
false
?
$subject
:
$result
;
}
src/Illuminate/Support/Str.php
statamic/cms
$breaker
=
Arr
::
get
(
$params
,
0
,
'<!--more-->'
);
return
strstr
(
$value
,
$breaker
,
true
);
}
src/Modifiers/CoreModifiers.php
statamic/cms
}
$expanded
=
strstr
(
$between
,
':'
);
src/Tags/Rotate.php
composer/composer
case
'openssl_version'
:
$opensslVersion
=
strstr
(
trim
(
strstr
(
OPENSSL_VERSION_TEXT
,
' '
)),
' '
,
true
);
$opensslVersion
=
$opensslVersion
?:
OPENSSL_VERSION_TEXT
;
$text
=
"The OpenSSL library (
{
$opensslVersion
}
) used by PHP does not support TLSv1.2 or TLSv1.1."
.
PHP_EOL
;
src/Composer/Command/DiagnoseCommand.php