Changeset View
Changeset View
Standalone View
Standalone View
externals/pear-figlet/docs/examples/hello_world.php
Context not available. | |||||
$str = iconv('utf-8', 'ucs-2be', $str); | $str = iconv('utf-8', 'ucs-2be', $str); | ||||
$out = ''; | $out = ''; | ||||
for ($i = 0, $len = strlen($str); $i<$len; $i++) { | for ($i = 0, $len = @strlen($str); $i<$len; $i++) { | ||||
$code = ord($str[$i++]) * 256 + ord($str[$i]); | $code = ord($str[$i++]) * 256 + ord($str[$i]); | ||||
$out .= $code < 128 ? $str[$i] : sprintf('%%u%04X', $code); | $out .= $code < 128 ? $str[$i] : sprintf('%%u%04X', $code); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0