strrchr
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the last occurrence of a character in a string
strrchr
(
string $haystack
,
string $needle
):
string
|
false
$prefixedKeys
[
$i
] =
self
::
PREFIX_DYNAMIC
.
$k
;
}
} elseif (
$debugClass
!==
$class
&&
1
===
strpos
(
$k
,
$class
)) {
$prefixedKeys
[
$i
] =
"\0"
.
$debugClass
.
strrchr
(
$k
,
"\0"
);
}
++
$i
;
}
Caster/Caster.php
if (!
$param
->
isOptional
() &&
$param
->
allowsNull
() &&
'mixed'
!==
$type
->
getName
()) {
$signature
.=
'?'
;
}
$signature
.=
substr
(
strrchr
(
'\\'
.
$type
->
getName
(),
'\\'
),
1
).
' '
;
}
}
$signature
.=
$k
;
Caster/ReflectionCaster.php
$signature
.=
' = '
;
if (
$param
->
isDefaultValueConstant
()) {
$signature
.=
substr
(
strrchr
(
'\\'
.
$param
->
getDefaultValueConstantName
(),
'\\'
),
1
);
} elseif (
null
===
$v
) {
$signature
.=
'null'
;
} elseif (
\is_array
(
$v
)) {
Caster/ReflectionCaster.php
} elseif (
\is_bool
(
$v
)) {
$signature
.=
$v
?
'true'
:
'false'
;
} elseif (
\is_object
(
$v
)) {
$signature
.=
'new '
.
substr
(
strrchr
(
'\\'
.
get_debug_type
(
$v
),
'\\'
),
1
);
} else {
$signature
.=
$v
;
}
Caster/ReflectionCaster.php
$signature
= (empty(
$a
[
$prefix
.
'returnsReference'
]) ?
''
:
'&'
).
'('
.
substr
(
$signature
,
2
).
')'
;
if (isset(
$a
[
$prefix
.
'returnType'
])) {
$signature
.=
': '
.
substr
(
strrchr
(
'\\'
.
$a
[
$prefix
.
'returnType'
],
'\\'
),
1
);
}
return
$signature
;
Caster/ReflectionCaster.php