PHP code example of clippy / std

1. Go to this page and download the library: Download clippy/std 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/ */

    

clippy / std example snippets


#!/usr/bin/env pogo

#!ppy()->register(plugins());
$c['app']->main('yourName [--lang=]', function ($yourName, $lang, $io) {
  $messages = [
    'de' => "Hallo, <comment>$yourName</comment>!",
    'en' => "Hello, <comment>$yourName</comment>!",
    'es' => "!Hola <comment>$yourName</comment>!",
    'fr' => "Salut, <comment>$yourName</comment>!",
  ];
  $io->writeln($messages[$lang] ?? $messages['en']);
});

$ ./greeter.php world
Hello, world!
$ ./greeter.php Alice --lang=fr
Salut, Alice!