json_decode
symfony/var-dumper
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
testClone
()
{
$json
=
json_decode
(
'{"1":{"var":"val"},"2":{"var":"val"}}'
);
$cloner
= new
VarCloner
();
$clone
=
$cloner
->
cloneVar
(
$json
);
Tests/Cloner/VarClonerTest.php
$this
->
markTestSkipped
(
'xdebug is active'
);
}
$data
= (array)
json_decode
(
'{"1":{}}'
);
$cloner
= new
VarCloner
();
$clone
=
$cloner
->
cloneVar
(
$data
);
Tests/Cloner/VarClonerTest.php
public function
testJsonCast
()
{
$var
= (array)
json_decode
(
'{"0":{},"1":null}'
);
foreach (
$var
as &
$v
) {
}
$var
[] = &
$v
;
Tests/Dumper/CliDumperTest.php