<?php
class DumpLeaf
{
    public int $id;
    public bool $active;

    public function __construct(int $id, bool $active)
    {
        $this->id = $id;
        $this->active = $active;
    }
}

class DumpNode
{
    public int $count;
    public bool $enabled;
    public float $ratio;
    public array $items;
    public DumpLeaf $leaf;

    public function __construct()
    {
        $this->count = 42;
        $this->enabled = true;
        $this->ratio = 3.5;
        $this->items = [
            "int" => 7,
            "false" => false,
            "float" => 2.25,
            "sub" => [
                "zero" => 0,
                "truth" => true,
                "leaf" => new DumpLeaf(9, false),
            ],
        ];
        $this->leaf = new DumpLeaf(11, true);
    }
}

$payload = [
    "int" => 123,
    "bool_true" => true,
    "bool_false" => false,
    "float" => 12.75,
    "subarray" => [
        "positive" => 5,
        "nested_bool" => true,
        "nested_float" => 0.125,
    ],
    "object" => new DumpNode(),
];

var_dump($payload);
