I'm creating a php script to download modify and install underscores from github, but I have problem with heredocs stntax, and this isn't the first time. I can't understand why it doesn't work. It returns a end of file error, can anyone help me understand why?
#!/usr/bin/php
<?php
if($argc < 7) {
echo <<<ERROR_INPUT
syntax:
set.php -n [theme_name] -d [domain_name] -t [target]
ERROR_INPUT;
exit();
}
$catch = false;
foreach($argv as $arg) {
$target = '';
if($arg === '-t') {
$catch = true;
continue;
}
if($catch === true){
$target = $arg;
$catch = false;
break;
}
}
exec("git clone https://github.com/Automattic/_s $target");