PHP code example of gbksoft / shell-command-builder

1. Go to this page and download the library: Download gbksoft/shell-command-builder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gbksoft / shell-command-builder example snippets


$cmd = $builder->setCommand(new Command('git'))
            ->addArgument(new Argument('log'))
            ->addFlag(new Flag('--color'))
            ->addFlag(new Flag('--no-merges'))
            ->addFlag(new Flag('-10'))
            ->addFlag(new Flag('--'))
            ->addArgument(new Argument('./'))
            ->build();