php/class-wp-cli.php
public static function get_config( $key = null ) {
		if ( null === $key ) {
			return self::get_runner()->config;
		}

		if ( ! isset( self::get_runner()->config[ $key ] ) ) {
			self::warning( "Unknown config option '$key'." );
			return null;
		}

		return self::get_runner()->config[ $key ];
	}
public static function get_config( $key = null ) {
		if ( null === $key ) {
			return self::get_runner()->config;
		}

		if ( ! isset( self::get_runner()->config[ $key ] ) ) {
			self::warning( "Unknown config option '$key'." );
			return null;
		}

		return self::get_runner()->config[ $key ];
	}
public static function get_config ( $ key = null ) { if ( null === $ key ) { return self :: get_runner ( ) -> config ; } if ( ! isset ( self :: get_runner ( ) -> config [ $ key ] ) ) { self :: warning ( "Unknown config option '$key'." ) ; return null ; } return self :: get_runner ( ) -> config [ $ key ] ; }
Get values of global configuration parameters.

Provides access to `--path=<path>`, `--url=<url>`, and other values of
the [global configuration parameters](https://wp-cli.org/config/).

```
WP_CLI::log( 'The --url=<url> value is: ' . WP_CLI::get_config( 'url' ) );
```

@access public
@category Input

@param string $key Get value for a specific global configuration parameter.
@return mixed
Get values of global configuration parameters .