![Forrest logo](/images/logo.png)
phpenv:tldr:5ab44
The command "phpenv rehash" refers to a command used in phpenv, a tool used to manage multiple PHP installations on a single machine.
When you have multiple PHP versions installed with phpenv, it allows you to switch between them using the "phpenv global" or "phpenv local" commands.
The "phpenv rehash" command is used to update the phpenv shim executable files for all installed PHP versions. These shim files are used to switch between PHP versions by redirecting the command to the correct PHP binary for the selected version.
When you install a new PHP version or update your existing installation, you need to run "phpenv rehash" to update the shim files. This ensures that the correct PHP version is used when switching between versions with phpenv commands.