Code Snippets

<?php
declare(strict_types=1);

array_shift($argv);

$name  = $argv[0] ?? 'world';
$count = (int)($argv[1] ?? 1);

for ($i = 0; $i < $count; $i++) {
    echo "Hello, $name!\n";
}