Php features

Switch php versions

Using nothing but homebrew's brew [un]link command, steward switches php versions within seconds. To switch to another php version:
# Make sure the php version is installed
brew install [email protected]
# Switch the php version
stew php:version 7.3

Speed benchmark

time stew php:ver 7.2
# stew php:ver 7.2 2,96s user 2,11s system 43%

Toggle xdebug

# Enable xdebug
stew xdebug:enable
# Disable xdebug
stew xdebug:disable
The —restart option is required to restart the php-fpm service and load xdebug in the browser.
time stew xdebug:dis
# stew xdebug:dis 0,33s user 0,17s system 95%

Check xdebug status

You can quickly check if xdebug is enabled using the following command.
stew xdebug:status

Tail the logs

You can tail the php error logs using the following command.
stew logs:tail
To follow the redis-cli monitor, you can use the following command.
stew redis:tail