When wp behaves differently from the website, the first thing I want to know is which PHP it runs on. The command line often uses another PHP than the web server does.
wp cli info prints details about the WP-CLI environment. The docs call it helpful for diagnostics and list what it shares: operating system, shell, PHP binary and version, PHP memory limit, the php.ini in use, the WP-CLI root directory, the global and project config files and the WP-CLI version.
wp cli info
The output is a list of lines such as PHP binary:, PHP version:, php.ini used: and WP-CLI project config:. For scripts there is a JSON form:
wp cli info --format=json
The php.ini used line is the one I look at first. The docs note that this file is typically different from the one the web server uses, so a memory limit or an extension can be set in the browser’s PHP and missing in the terminal, or the other way round.
The WP-CLI project config line shows where the project config file is located. The WP-CLI global config line does the same for the global one. See the config docs if you want to know how WP-CLI finds them.
The command runs on the before_wp_load hook, just before WordPress starts loading. It describes WP-CLI and PHP, so it says nothing about plugins or the site itself.
Further reading: wp cli info (WP-CLI handbook)