HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/doc/pear/Text_Figlet/docs/examples/hello_world.php
<?php

/* UTF-8 convert to FIGlet Unicode */
/* iconv PHP module required */
function utf8tofiglet($str)
{
    // escape %u
    $str = str_replace('%u', sprintf('%%%%u%04X', ord('u')), $str);

    if (function_exists('iconv')) {
        $str = iconv('utf-8', 'ucs-2be', $str);
        $out = '';

        for ($i = 0, $len = strlen($str); $i<$len; $i++) {
            $code = ord($str[$i++]) * 256 + ord($str[$i]);

            $out .= $code < 128 ? $str[$i] : sprintf('%%u%04X', $code);
        }

        return $out;
    }

    return $str;
}

require_once 'Text/Figlet.php';

$figlet = new Text_Figlet();
$error  = $figlet->LoadFont('makisupa.flf');
if (PEAR::isError($error)) {
    echo 'Error: ' . $error->getMessage() . "\n";
} else {
    echo $figlet->LineEcho(utf8tofiglet('Hello, world!')) . "\n";
}
?>