is_array
laravel/octane
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an array
is_array
(
mixed $value
):
bool
->
explode
(
"\n"
)
->
filter
()
->
each
(function (
$output
) {
if (!
is_array
(
$debug
=
json_decode
(
$output
,
true
))) {
return
$this
->
info
(
$output
);
}
src/Commands/StartRoadRunnerCommand.php
return
$this
->
info
(
$output
);
}
if (
is_array
(
$stream
=
json_decode
(
$debug
[
'msg'
],
true
))) {
return
$this
->
handleStream
(
$stream
);
}
src/Commands/StartRoadRunnerCommand.php
Str
::
of
(
$server
->
getIncrementalOutput
())
->
explode
(
"\n"
)
->
filter
()
->
each
(fn (
$output
) =>
is_array
(
$stream
=
json_decode
(
$output
,
true
))
?
$this
->
handleStream
(
$stream
)
:
$this
->
info
(
$output
)
);
src/Commands/StartSwooleCommand.php
->
filter
()
->
groupBy
(fn (
$output
) =>
$output
)
->
each
(function (
$group
) {
is_array
(
$stream
=
json_decode
(
$output
=
$group
->
first
(),
true
)) && isset(
$stream
[
'type'
])
?
$this
->
handleStream
(
$stream
)
:
$this
->
raw
(
$output
);
});
src/Commands/StartSwooleCommand.php