Update php-shell-cmd.php

Apply improved version of pull request