array_search
reactphp/event-loop
Supported Versions: PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8
Searches the array for a given value and returns the first corresponding key if successful
array_search
(
mixed $needle
, array
$haystack
,
bool $strict
=
false
):
int
|
string
|
false
return;
}
$index
=
\array_search
(
$listener
,
$this
->
signals
[
$signal
],
true
);
unset(
$this
->
signals
[
$signal
][
$index
]);
if (isset(
$this
->
signals
[
$signal
]) &&
\count
(
$this
->
signals
[
$signal
]) ===
0
) {
src/SignalsHandler.php