Dup Goto 📝

Command Line Args in PHP

PT2/lang/php/cli php cli 05-31 10:43:07
To Pop
11 lines, 27 words, 156 chars Saturday 2025-05-31 10:43:07

Command Line Args in PHP

<?php
$args = $argv;
$me = array_shift($args); # $argv[0] is script name
foreach($argv as $arg) {
  echo "$arg\n";
}