strncmp
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Binary safe string comparison of the first n characters
strncmp
(
string $string1
,
string $string2
,
int $length
):
int
laravel/framework
protected function
isImmutableCustomDateTimeCast
(
$cast
)
{
return
strncmp
(
$cast
,
'immutable_date:'
,
15
) ===
0
||
strncmp
(
$cast
,
'immutable_datetime:'
,
19
) ===
0
;
}
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
laravel/framework
protected function
isImmutableCustomDateTimeCast
(
$cast
)
{
return
strncmp
(
$cast
,
'immutable_date:'
,
15
) ===
0
||
strncmp
(
$cast
,
'immutable_datetime:'
,
19
) ===
0
;
}
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
laravel/framework
if (
is_array
(
$action
) &&
!
Arr
::
isAssoc
(
$action
) &&
Reflector
::
isCallable
(
$action
)) {
if (
strncmp
(
$action
[
0
],
'\\'
,
1
)) {
$action
[
0
] =
'\\'
.
$action
[
0
];
}
$action
= [
src/Illuminate/Routing/RouteRegistrar.php
statamic/cms
$mime
=
File
::
mimeType
(
$path
);
}
if (
$mime
!==
null
&&
strncmp
(
$mime
,
'image/'
,
6
) !==
0
) {
throw new
\Exception
(
"Image [
{
$path
}
] does not actually appear to be an image."
);
}
}
src/Imaging/ImageGenerator.php
reactphp/event-loop
protected function
tearDownSignalHandlers
()
{
parent
::
tearDown
();
if (
strncmp
(
$this
->
getName
(
false
),
'testSignal'
,
10
) ===
0
&&
extension_loaded
(
'pcntl'
)) {
$this
->
resetSignalHandlers
();
}
}
tests/StreamSelectLoopTest.php