PHP code example of shasoft / terminal-write-php

1. Go to this page and download the library: Download shasoft/terminal-write-php 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/ */

    

shasoft / terminal-write-php example snippets


// Очистить экран
Terminal::clear();

// Вывести в одну строку
Terminal::write('<FgRed>Te</FgRed>');
Terminal::write('<Success>st</Success>');

// Вывести в две строки
Terminal::writeLn('<FgRed>Tes</FgRed>t<INFO>Info</>');
Terminal::writeLn('<Warning>Warning</Warning><title>Info</>');

// Вывести линию заданным цветом заданным символом
Terminal::hr('<Error>', '`');

// Добавить тег
Terminal::addTag('Test', '<File>');
// Вывести с использованием добавленного тега
Terminal::writeLn('<test>aaaa</>');
Terminal::writeLn('<Test>bbb</>');
Terminal::writeLn('<TEST>ccc</>');