OpenSwoole\Core\Psr\Response->withStatus

25.x is outdated, please check the latest version 26.x


Latest version: pecl install openswoole-26.2.0

Declaration

<?php OpenSwoole\Core\Psr\Response->withStatus()

Parameters

code

The 3-digit integer result code to set.

reasonPhrase

The reason phrase to use with the provided status code

Return

Description

Set the response status code.

Last updated on February 28, 2026