$val) { $next = array_merge($path, [(string) $key]); /* * A nested table recurses; a leaf becomes one declaration. An empty table is * indistinguishable from an empty array after `json_decode(…, true)` and is * treated as a table, so it contributes nothing. */ if (is_array($val) && ($val === [] || !Value::isList($val))) { self::walk($val, $next, $out); continue; } $out[] = self::path_to_var(implode('.', $next)) . ':' . Value::str($val) . ';'; } } }