src/Phinx/Config/Config.php
public static function fromPhp($configFilePath)
    {
        ob_start();
        /** @noinspection PhpIncludeInspection */
        $configArray = include($configFilePath);

        // Hide console output
        ob_end_clean();

        if (!is_array($configArray)) {
            throw new \RuntimeException(sprintf(
                'PHP file \'%s\' must return an array',
                $configFilePath
            ));
        }

        return new static($configArray, $configFilePath);
    }
public static function fromPhp($configFilePath)
    {
        ob_start();
        /** @noinspection PhpIncludeInspection */
        $configArray = include($configFilePath);

        // Hide console output
        ob_end_clean();

        if (!is_array($configArray)) {
            throw new \RuntimeException(sprintf(
                'PHP file \'%s\' must return an array',
                $configFilePath
            ));
        }

        return new static($configArray, $configFilePath);
    }
public static function fromPhp ( $ configFilePath ) { ob_start ( ) ; /** @noinspection PhpIncludeInspection */ $ configArray = include ( $ configFilePath ) ; // Hide console output ob_end_clean ( ) ; if ( ! is_array ( $ configArray ) ) { throw new \ RuntimeException ( sprintf ( 'PHP file \'%s\' must return an array' , $ configFilePath ) ) ; } return new static ( $ configArray , $ configFilePath ) ; }
Create a new instance of the config class using a PHP file path.

@param  string $configFilePath Path to the PHP File
@throws \RuntimeException
@return \Phinx\Config\Config
Create a new instance of the config class using a PHP file path .