Last active
July 5, 2018 10:38
-
-
Save zonuexe/7b69cad4594f769e9ed08fdd976dc7ba to your computer and use it in GitHub Desktop.
PHPの機能を使って、くそコードを表明します
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 /** @license WTFPL | by USAMI Kenta */ | |
$クソ関数 = function() { | |
kuso(); | |
var_dump('うんこ'); | |
}; | |
suppress_kuso(); | |
$クソ関数(); | |
reject_kuso(); | |
$クソ関数(); | |
var_dump('ばいばいきん'); | |
/** くそコードが実行されようとすることを通知します */ | |
function kuso() | |
{ | |
trigger_error('くそコードが実行されようとしてますけど、いいんですか????', E_USER_NOTICE); | |
} | |
/** くそコードを黙殺します */ | |
function suppress_kuso() | |
{ | |
error_reporting(error_reporting() & ~E_USER_NOTICE); | |
} | |
/** くそコードを許容しません */ | |
function reject_kuso() | |
{ | |
error_reporting(error_reporting() | E_USER_NOTICE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ライセンスを追加しました。WTFPL(Do What The Fuck You Want To Public License)です。くそったれ。