Last active
October 14, 2023 08:13
-
-
Save Endermanbugzjfc/f807dcc3ac79501b2e8e998834575d99 to your computer and use it in GitHub Desktop.
Random stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const DELAY_MS = 0; | |
const EMOTICONS = [ | |
"ouo", | |
"owo", | |
"awa", | |
"pwp", | |
"qwq", | |
"ovo", | |
"oao", | |
"qaq", | |
"uwu", | |
"aua", | |
"ewe", | |
"^_^", // lol sofe | |
"6w6", | |
"7w7", | |
"=w=" // https://discord.com/channels/373199722573201408/373199722573201410/916356495174664222 | |
]; | |
const COLOURS = [ | |
"\x1b[38;5;16m", | |
"\x1b[38;5;19m", | |
"\x1b[38;5;34m", | |
"\x1b[38;5;37m", | |
"\x1b[38;5;124m", | |
"\x1b[38;5;127m", | |
"\x1b[38;5;214m", | |
"\x1b[38;5;145m", | |
"\x1b[38;5;59m", | |
"\x1b[38;5;63m", | |
"\x1b[38;5;83m", | |
"\x1b[38;5;87m", | |
"\x1b[38;5;203m", | |
"\x1b[38;5;207m", | |
"\x1b[38;5;227m", | |
"\x1b[38;5;231m" | |
]; | |
while (true) { | |
echo ((stripos(php_uname(), "Win") !== false or php_uname() === "Msys") ? COLOURS[mt_rand(0, count(COLOURS) - 1)] : "") . ($chosen_emoticon = EMOTICONS[mt_rand(0, count(EMOTIONS) - 1)]) . str_repeat(" ", mt_rand(1, 4)); | |
if (function_exists("cli_set_process_title")) @cli_set_process_title("C:\\WINDOWS\\{$chosen_emoticon}.exe"); | |
$delay = microtime(true) + (DELAY_MS / 1000); | |
while (microtime(true) < $delay); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ns = 0; | |
$ns = time() + 1; | |
$tz = date_default_timezone_get(); | |
while (true) { | |
if (time() >= $ns) { | |
system("cls"); | |
date_default_timezone_set($tz); | |
$d = time(); | |
date_default_timezone_set("Asia/Hong_Kong"); | |
$ld = time(); | |
$omt = (new DateTime("2019-04-12 12:27:41")); | |
$nit = (new DateTime(date("Y-m-d h:i:s", $d))); | |
$bft = (new DateTime("2012-11-15 00:00:00")); | |
$mft = (new DateTime("2017-07-01 00:00:00")); | |
$fdt = (new DateTime("2020-06-06 00:00:00")); | |
if (date("a", $ld) === "am") $amd = "上午"; | |
else $amd = "下午"; | |
echo chr(27).chr(91).'H'.chr(27).chr(91).'J'; | |
echo colorize("\n\n 距離公元1970年1月1日 上午0時0分0秒(Unix Epoch時間戳 0 ): \n 現在的Unix Epoch時間戳爲 " . strval($d) . "\n\n UTC+8時區報時: \n " . date("公元Y年n月j日 ", $ld) . strval($amd) . date("g時", $ld) . intval(date("i", $ld)) . "分" . intval(date("s", $ld)) . "秒\n\n 國際原子時間: \n " . date(DATE_ATOM, $d) . "\n\n 距離歐姆網頁版第一個快照的發佈時間(公元2019年4月12日 下午12時27分41秒):" . "\n 至今已過去 " . strval($omt->diff($nit)->format("%y年%m月%d日 %h時%i分%s秒")) . "\n\n 距離人類迷惑式思維習氏男子當選某領導人(公元2012年11月15日): \n 至今已過去 " . $bft->diff($nit)->format("%y年%m月%d日") . "\n\n 距離擁有 \"攬炒之母\" 稱號的鄭氏女子擔任某特首(公元2017年7月1日): \n 至今已過去 " . $mft->diff($nit)->format("%y年%m月%d日") . "\n\n 距離某韓氏臺灣特種魚市長被罷免(公元2020年6月6日): \n 至今已過去 " . $fdt->diff($nit)->format("%y年%m月%d日" . "\n\n\n\n\n\n 更新計劃: RE葬禮舉行日至今差距、 字體顏色更新、 戀發片日至今距離、 其他人類迷惑式的更新~\n\n\n\n\n\n Powered by $~ ouo >_ t3rminal ouo終端\n $~ ouo >_ t!ming ouo鍾端")); | |
} | |
} | |
function colorize(string $t = "") : string { | |
return $t; | |
} |
what?
what?
Toy scripts I made when I started to learn PHP
Don't question
i will
W H Y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't question.