Response: return an array → JSON

Handler returns a plain PHP array. The framework auto-encodes it as JSON and sets Content-Type: application/json. No need to call $response->json().

Live URL

GET /demo/response/json

Response

Status
200 OK
Content-Type
application/json
{
    "framework": "ZealPHP",
    "async": true,
    "engine": "OpenSwoole",
    "time": 1779398214
}