Skip to content

Instantly share code, notes, and snippets.

@ThijsFeryn
Created June 26, 2012 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThijsFeryn/2994304 to your computer and use it in GitHub Desktop.
Save ThijsFeryn/2994304 to your computer and use it in GitHub Desktop.
Working with arguments in PHP on the command line
<?php
echo "There are {$argc} passed: ".PHP_EOL;
foreach($argv as $k=>$v){
echo "Argument {$k}: {$v}".PHP_EOL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment