Skip to main content

PHP

PHP export lets you generate PHP-ready source code from grid data.

What is PHP Data Output?

AnyWayData can export each row as either:

  • an anonymous associative array (map/dictionary style)
  • a named class instance

Rows are then wrapped in an outer collection that can be rendered as:

  • array(...)
  • [ ... ]

You can also assign that collection to a named variable.

How is PHP output different from JSON?

JSON is a language-neutral data format.

PHP output uses PHP syntax directly, including:

  • $variable = ...
  • associative arrays with =>
  • optional class definitions and new ClassName(...) rows

AnyWayData Support for PHP

AnyWayData currently supports exporting data to PHP format.

See PHP Options for configuration details.

Unit Test Code Generation

You can also generate data-driven test scaffolding for PHP using frameworks: phpunit, pest.

For more information, see Unit Test Code Generation.