Manage php.ini settings on a temporary basis.

1.0.0 2018-05-04 12:36 UTC


Manage php.ini directives on a temporary basis.

Full documentation is available at https://duncan3dc.github.io/php-ini/
PHPDoc API documentation is also available at https://duncan3dc.github.io/php-ini/api/

release build coverage


The recommended method of installing this library is via Composer.

Run the following command from your project root:

$ composer require duncan3dc/php-ini

Getting Started

use duncan3dc\PhpIni\Ini;

require __DIR__ . "/vendor/autoload.php";

$ini = new Ini;

$ini->set("include_path", "/tmp/cool-php-stuff");

require "my-cool-file.php";

use duncan3dc\PhpIni\State;

$ini = new State;

$ini->set("memory_limit", "1M");

$ini->call(function () {
    # This code can't use much memory

# This code can use as much memory as the default memory_limit allows

Read more at http://duncan3dc.github.io/php-ini/


A Changelog has been available since the beginning of time

Where to get help

Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter