PHP code example of yuralukashik / short-commands-bundle
1. Go to this page and download the library: Download yuralukashik/short-commands-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yuralukashik / short-commands-bundle example snippets
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Console\Output\OutputInterface;
return function (
Filesystem $filesystem,
OutputInterface $output,
string $name = 'Unknown'
) {
$currentFileExists = $filesystem->exists(__FILE__);
$message = $currentFileExists
? 'current file really exists'
: 'current file does not exist';
$output->writeln("Hey {$name}!");
$output->writeln("I've just checked and {$message}");
};