php-ini Manage php.ini directives on a temporary basis

Getting Started

Usage

Getting Started

View the API Documentation for this class

The state class allows you to execute code using specific ini directives:

$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
eatAllTheMemory();