hpeccatte/properties-parser

Parser for properties files.

Installs: 9 704

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/hpeccatte/properties-parser

1.0.3 2022-01-18 08:33 UTC

This package is auto-updated.

Last update: 2025-09-18 16:17:02 UTC


README

Build Status

Properties Parser

Here is a PHP library to retrieve the properties of a .properties file.

It seems that .properties files are mainly used by Java programs. But you may have also defined a properties file in a PHP project or would like to use the same file with both languages.

Installation

composer require hpeccatte/properties-parser

.properties file format

Define a property

In a .properties file, property/value can be separated by =, : or a whitespace.

A property can also be defined on multiple lines:

property = value \
      which \
      is \
      multilined

In this case, the property will be property and the value value which is multilined.

Comments

You can define comments in your file by starting a line with # or ! characters.

References

This parser was implemented to try to match as much as possible the behavior defined by the Java Properties Parser.