PHP Options
The configuration options for PHP are listed below.
Include PHP Tag
Add <?php at the top of the generated output.
Collection Type
Choose the outer collection syntax:
arrayforarray(...)listfor[ ... ]
Prefer Short Array Syntax
When enabled, arrays use [ ... ] syntax where possible.
Assign to Variable
When enabled, output is assigned to a named variable like:
$data = array(...);
Use Variable Name to configure the assigned name.
Number Convert
When enabled, numeric-looking values are quoted as strings.
When disabled, numeric-looking values are emitted as numeric literals.
Scalar Coercion
- Blank value behavior:
empty stringornull - Coerce
"true"/"false"to boolean literals - Coerce
"null"tonull
Anonymous Objects
Object representation supports:
- associative arrays
stdClassvia object cast- named class instances with generated class definition
Use Object Name to configure the class name when anonymous objects are disabled.
Array Key Quote Style
Choose quoted or unquoted array keys.
Pretty Print
When enabled, output uses line breaks and indentation.
Delimiter
Choose indentation delimiter:
- tab
- space
- custom value
For custom value, set Custom Delimiter.
PHP Compatibility and Class Generation
- Compatibility target:
PHP 7+orPHP 8+ - Class property typing: untyped or typed (
mixed) - Constructor promotion toggle (PHP 8+)
- Constructor args style: positional or named
Named constructor arguments require PHP 8+.