Download the PHP package php-collective/toml without Composer

On this page you can find all versions of the php package php-collective/toml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package toml

PHP Toml

CI Latest Stable Version Total Downloads PHPStan PHP Version

A TOML (v1.0 and v1.1) parser and encoder for PHP with AST access and collected parse errors.

Documentation

Features

Requirements

Installation

Demo

Quick Start

API Reference

Decoding

Encoding

DocumentFormattingMode::SourceAware is lossless for unchanged parsed regions and uses local fallback rules for edited ones. See the Compatibility page for the exact editing contract. skipNulls lets encode() omit nulls instead of throwing. multilineThreshold (?int, default null) keeps current single-line strings when unset; when set, scalar strings longer than the threshold are encoded as multiline basic strings. inlineTableThreshold (?int, default null) keeps nested tables as table sections when unset; when set, flat nested arrays with at most that many keys are encoded inline, for example point = { x = 1, y = 2 }. integerBase (IntegerBase, default IntegerBase::Decimal) controls the radix for integers produced by encode() (and normalized encodeDocument() output). Hexadecimal, Octal, and Binary emit 0x/0o/0b literals. Since TOML allows a sign only on decimal integers, negative values always fall back to decimal. Source-aware document re-encoding preserves each integer's original source base regardless of this option.

Error Handling

The parser provides detailed error messages:

For tooling, use tryParse() to collect all errors:

Supported Syntax

The library currently supports:

See the Support Matrix for current coverage and known gaps.

Versioned behavior is available through TomlVersion and EncoderOptions(version: ...). The default remains TOML 1.1-compatible; use TomlVersion::V10 when you need strict TOML 1.0 parsing or output rules.

For explicit local temporal encoding, use:

For per-value integer bases, wrap values in PhpCollective\Toml\Value\TomlInteger (e.g. new TomlInteger(255, IntegerBase::Hexadecimal)0xFF).

Comparison with Other PHP Libraries

Feature php-collective/toml Others
Error Recovery Yes No
Multiple Errors Yes No
AST Access Yes Limited/No
Round-trip formatting preservation Partial Varies

See Limitations for details.


All versions of toml with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
symfony/polyfill-mbstring Version ^1.30
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-collective/toml contains the following files

Loading the files please wait ...