json_decode
laravel/octane
Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0
Decodes a JSON string
json_decode
(
string $json
,
?
bool $associative
=
null
,
int $depth
=
512
,
int $flags
=
0
):
mixed
public function
ddInfo
(
$throwable
,
$verbosity
=
null
)
{
collect
(
json_decode
(
$throwable
[
'message'
],
true
))
->
each
(fn (
$var
) =>
VarDumper
::
dump
(
$var
));
}
src/Commands/Concerns/InteractsWithIO.php
->
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
{
if (
$this
->
class
==
DdException
::class) {
return new
DdException
(
json_decode
(
$this
->
message
,
true
)
);
}
src/Exceptions/TaskExceptionResult.php
public function
read
(): array
{
$state
=
is_readable
(
$this
->
path
)
?
json_decode
(
file_get_contents
(
$this
->
path
),
true
)
: [];
return [
src/RoadRunner/ServerStateFile.php
public function
read
(): array
{
$state
=
is_readable
(
$this
->
path
)
?
json_decode
(
file_get_contents
(
$this
->
path
),
true
)
: [];
return [
src/Swoole/ServerStateFile.php