<?php
$client = ['id' => 42, 'name' => 'Учебный клиент'];
header('Content-Type: application/json; charset=utf-8');
echo json_encode($client, JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);<?php
$client = ['id' => 42, 'name' => 'Учебный клиент'];
header('Content-Type: application/json; charset=utf-8');
echo json_encode($client, JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);