Skip to main content

Output & Serialization

output — Send to response

The primary mechanism for producing HTTP response body content:

XML
<output>Hello World!</output>

Full reference →


header — Set HTTP header

Sets HTTP response headers and optionally the status code:

XML
<header status="200">Content-Type: application/json</header>

Specifying a header without a value removes it from the response.

Full reference →


sleep — Pause execution

Pauses for a specified duration in seconds (supports fractional seconds):

XML
<sleep>0.5</sleep>
<!-- pauses for 500 milliseconds -->

Full reference →


serialize / unserialize

Converts variables to/from a storable string representation (PHP-compatible format). Preserves types and structure, unlike JSON which loses type information:

XML
<array var="names">
<item key="bg">Bill Gates</item>
<item key="sj">Steve Jobs</item>
</array>

<serialize var="names" var_result="data"/>
<unserialize var="restored">$data</unserialize>
<output>$restored.bg</output>
<!-- Bill Gates -->

serialize | unserialize