Kill all fastcgi processes

Sometimes I need to reset all php fastcgi processes especially when I change the php version for users in their php-wrapper

pgrep php-cgi | xargs kill -9