idiosyncratic/editorconfig

PHP implementation of EditorConfig

Maintainers

Package info

github.com/idiosyncratic-code/editorconfig-php

pkg:composer/idiosyncratic/editorconfig

Statistics

Installs: 1 857 291

Dependents: 3

Suggesters: 0

Stars: 19

Open Issues: 0

0.1.3 2021-06-02 16:24 UTC

This package is auto-updated.

Last update: 2026-02-23 03:48:47 UTC


README

PHP implementation of EditorConfig

Installation

Install with Composer:

composer require idiosyncratic/editorconfig

Usage

<?php

require_once('vendor/autoload.php');

use Idiosyncratic\EditorConfig\EditorConfig;

$ec = new EditorConfig();

// $config will be an array of the declarations matching for the specified path
$config = $ec->getConfigForPath(__FILE__);

// Print matching configuration rules as string
print $ec->printConfigForPath(__FILE__) . PHP_EOL;