Skip to content

Instantly share code, notes, and snippets.

@Taluu
Created April 10, 2014 09:50
Show Gist options
  • Save Taluu/10363032 to your computer and use it in GitHub Desktop.
Save Taluu/10363032 to your computer and use it in GitHub Desktop.
<?php
use Symfony\Component\Process\ProcessBuilder,
Symfony\Component\Process\ProcessUtils;
$builder = new ProcessBuilder;
$builder->setPrefix(['--argument-name', 'argument value']);
// after the ProcessUtils
$cmd = '"--argument-name" "argument value"';
// Why ? Because escapeshellarg escapes everything, no questions asked... Even the --argument-names (and -a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment