src/Config_Command.php
public function get( $args, $assoc_args ) {
		$path = $this->get_config_path();

		list( $name ) = $args;
		$type         = Utils\get_flag_value( $assoc_args, 'type' );

		$value = $this->return_value( $name, $type, self::get_wp_config_vars() );
		WP_CLI::print_value( $value, $assoc_args );
	}
public function get( $args, $assoc_args ) {
		$path = $this->get_config_path();

		list( $name ) = $args;
		$type         = Utils\get_flag_value( $assoc_args, 'type' );

		$value = $this->return_value( $name, $type, self::get_wp_config_vars() );
		WP_CLI::print_value( $value, $assoc_args );
	}
public function get ( $ args , $ assoc_args ) { $ path = $ this -> get_config_path ( ) ; list ( $ name ) = $ args ; $ type = Utils \ get_flag_value ( $ assoc_args , 'type' ) ; $ value = $ this -> return_value ( $ name , $ type , self :: get_wp_config_vars ( ) ) ; WP_CLI :: print_value ( $ value , $ assoc_args ) ; }
Gets the value of a specific constant or variable defined in wp-config.php file.

## OPTIONS

<name>
: Name of the wp-config.php constant or variable.

[--type=<type>]
: Type of config value to retrieve. Defaults to 'all'.
---
default: all
options:
- constant
- variable
- all
---

[--format=<format>]
: Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---

## EXAMPLES

# Get the table_prefix as defined in wp-config.php file.
$ wp config get table_prefix
wp_

@when before_wp_load
Gets the value of a specific constant or variable defined in wp - config . php file .