Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0
Decodes a JSON string
<?php json_decode(    string $json,    ?bool $associative = null,    int $depth = 512,    int $flags = 0): mixed
<?php     public function testClone()

    {

        $json = json_decode('{"1":{"var":"val"},"2":{"var":"val"}}');



        $cloner = new VarCloner();

        $clone = $cloner->cloneVar($json);
<?php             $this->markTestSkipped('xdebug is active');

        }



        $data = (array) json_decode('{"1":{}}');



        $cloner = new VarCloner();

        $clone = $cloner->cloneVar($data);
<?php     public function testJsonCast()

    {

        $var = (array) json_decode('{"0":{},"1":null}');

        foreach ($var as &$v) {

        }

        $var[] = &$v;