diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-15 00:26:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-15 00:26:13 +0900 |
| commit | c830af9e843f5350d1f88bbeeda9aa7db859b75a (patch) | |
| tree | 1c473964c451ff430c0d3d27681a8c1bed4050cc /Q2.php | |
| parent | d2193fdd6505fdb4b272359d9a82cdbe34c55dd5 (diff) | |
| download | PHPerKaigi2023-tokens-c830af9e843f5350d1f88bbeeda9aa7db859b75a.tar.gz PHPerKaigi2023-tokens-c830af9e843f5350d1f88bbeeda9aa7db859b75a.tar.zst PHPerKaigi2023-tokens-c830af9e843f5350d1f88bbeeda9aa7db859b75a.zip | |
Diffstat (limited to 'Q2.php')
| -rw-r--r-- | Q2.php | 140 |
1 files changed, 140 insertions, 0 deletions
@@ -0,0 +1,140 @@ + + A long time ago in a galaxy far, + far away.... +<?php + +/***************************************************************** + * * + * MISSION: BRING BALANCE TO THE FALSE. * + * * + * There are ~550 "false"s here. Change one of them to "true". * + * * + *****************************************************************/ + +assert(8 === PHP_INT_SIZE, "This program does not support 32-bit platforms."); + +$false = <<<'FALSE' + [$@$@ ~&@@~ &|]x:[[$0= ~][\2*1024 + 65536 64**1 -&\1-]# %] l:[[$0=~][ + \2/\1 -]# % ]r:[6s;$13 l;!x;!s:s; + $17r; !x;!s :s;$5 l;!x; + !$s:$ @$@\/ *-+,] p:^s: + 1_$f: [^$1_ =~][] # %[$ + 1_=~] [$0=[ ~]?$1 =$[10 + ,]?~[ $0>$[ \2-121 119__ + 117__ 116__ 115__ 112__ + 111__ 108__ 105__ 104__ + 101__ 100__ 98 97 95 87 + 86 84 83 78 77 76 75 73 + 72 70 69 65 + 28ΓΈΓΈ\ %\%\% + \%\%\ %\%\% + \%\%\ %\%\% \%\%\%\%\% \%\%\%\%\% + \%\%\ %\%\% p;!1_f:\]? ~[_[$0=~][ + f;$[4 8*,]? ~[35p;!]?1 -]# f;~f:] + ?]?%]# + FALSE; + +goto false; FALSE: $FALSE = [ + -$fAlse, +false, -$falSe, ~+false, $falsE, $falsE, -$falSE, -$fAlse, + -$falSe, +false, -$faLse, +false, +false, -$faLSe, -$falSe, -$faLSe, + +false, -$faLSe, $falsE, -$faLsE, +false, -$faLsE, +false, +false, + +false, -$faLse, +false, +false, +false, -$faLsE, +false, +false, + +false, -$faLSe, +false, -$faLsE, +false, $falsE, -$faLsE, -$faLSe, + -$falSe, -$faLSe, +false, -$faLSe, -$falSe, -$faLSe, +false, -$faLSe, + $falsE, -$faLsE, +false, -$faLSE, +false, -$faLse, +false, +false, + +false, -$faLSE, +false, -$faLSe, +false, -$falSE, +false, $falsE, + -$faLsE, +false, -$faLSE, +false, -$faLse, +false, +false, +false, + -$faLSE, -$faLSe, +false, +false, -$faLse, -$faLSE, $falsE, +false, + $falsE, -$faLSE, -$faLsE, +false, -$fAlse, +false, -$falSe, -$falSE, + -$falSE, -$faLsE, -$falSE, -$falSE, $falsE, -$faLSe, +false, -$falSE, + +false, -$fAlse, +false, +false, +false, -$falSE, +false, -$falSE, + +false, -$fAlsE, +false, $falsE, -$faLSe, -$falSE, -$faLsE, -$fAlse, + -$falSE, +false, -$falSE, +false, -$falSe, -$faLse, -$falSE, +false, + $falsE, -$faLSe, +false, -$falSe, +false, -$faLSe, +false, -$faLse, + +false, -$falSE, +false, -$falSE, +false, -$faLsE, +false, -$falSE, + +false, $falsE, -$faLSe, +false, -$falSE, -$faLsE, -$faLSe, +false, + -$falSe, -$falSE, -$falSE, -$faLsE, -$falSE, -$falSE, $falsE, $falsE, + $falsE, $falsE, -$FalSe, $falSE, $FAlse, $FaLsE, $FAlsE, $FaLSE, + $FalSe, $FalSE, +false, $fALsE, $faLSe, $faLSe, $falsE, -$fALSE, + $fALse, $faLsE, $falSE, +false, $faLse, $falSe, $fAlse, $fAlSE, + $falSE, +false, $falSe, $fALSe, $falSe, $faLSE, $falSE, $fAlSe, + $fAlSE, $falsE, $falsE, -$fAlSE, +false, $fAlsE, $False, $FALsE, + $fALSE, $FAlSe, $FaLse, $FalSE, $fALSE, $faLse, $False, $FaLSe, + $FAlsE, $FalSE, $fALSE, $FalsE, $FalSE, $fALSE, $FALse, $FaLsE, + $FAlSe, $FaLse, $fALSE, $FALsE, $FaLSE, $FAlSE, $falsE, $FALSe, +]; false($false, $FALSE); goto False; false: + +$False = (!false+!false)**(!false+!false)**(!false+!false); +$fAlSE = +(!false.!false); +$FaLSe = +(!false+!false.!false+!false); +$faLSe = !false*(!false+!false)*(!false+!false+!false); +$FAlSE = (!false+!false+!false)**(!false+!false+!false); +$FaLse = +(!false+!false.+false); +$fAlSe = +(!false.+false); +$fAlsE = (!false+!false+!false)*(!false+!false+!false); +$FALsE = (!false+!false+!false.+false)-!false; +$fAlse = (!false+!false)**(!false+!false+!false); +$falSe = !false+!false; +$faLse = (!false+!false)*(!false+!false); +$FaLsE = +(!false+!false.!false); +$falsE = false**false; +$faLsE = !false+!false+!false+!false+!false; +$fALse = (!false+!false+!false)*(!false+!false)*(!false+!false); +$falSE = !false+!false+!false; +$faLSE = $fAlse-!false; +$FAlse = $fAlse*(!false+!false+!false); +$fALsE = $fALse+!false; +$FaLSE = $FAlse-!false; +$FAlsE = $faLsE**(!false+!false); +$FalSe = $fAlsE+$fAlsE; +$FalsE = $False+!false; +$fALSE = $falSE*$faLsE; +$FALse = $faLSE*(!false+!false)*(!false+!false); +$FALSe = $faLSe*+(!false.!false)*!false; +$fALSe = $faLSE*(!false+!false); +$FAlSe = $fALsE*(!false+!false); +$FalSE = $FaLse+~+false; + +goto FALSE; False: function false($false, &$FALSE, &$False = []): false { + for ($falsE = false*false; $falsE < strlen($false); $falsE++) + if (false === ($falSe = $false[$falsE])) false; + else if ('%' === $falSe) array_pop($False); + elseif ('_' === $falSe) $False[] = -array_pop($False); + else if ('~' === $falSe) $False[] = ~array_pop($False); + elseif (',' === $falSe) printf('%c', array_pop($False)); + else if ("'" === $falSe) $False[] = ord($false[++$falsE]); + elseif (str_contains('flprsx', $falSe)) $False[] = $falSe; + else if (';' === $falSe) $False[] = $GLOBALS[array_pop($False)]; + elseif ('$' === $falSe) $False[] = $False[count($False)-!false]; + else if ('!' === $falSe) false(array_pop($False), $FALSE, $False); + elseif (':' === $falSe) $GLOBALS[array_pop($False)] = array_pop($False); + else if ('&' === $falSe) $False[] = array_pop($False) & array_pop($False); + elseif ('*' === $falSe) $False[] = array_pop($False) * array_pop($False); + else if ('+' === $falSe) $False[] = array_pop($False) + array_pop($False); + elseif ('|' === $falSe) $False[] = array_pop($False) | array_pop($False); + else if ('-' === $falSe) $False[] = -array_pop($False) + array_pop($False); + elseif ('^' === $falSe) $False[] = empty($FALSE) ? -!false : array_pop($FALSE); + else if ("\\" === $falSe) array_push($False, array_pop($False), array_pop($False)); + elseif ('/' === $falSe) $False[] = floor(!false/array_pop($False) * array_pop($False)); + else if ('=' === $falSe) $False[] = array_pop($False) === array_pop($False) ? ~+false : +false; + elseif ('>' === $falSe) $False[] = array_pop($False) > array_pop($False) ? +false : ~+false; + else if ("\xc3" === $falSe) $False[] = $False[count($False)-array_pop($False)-!false-!false+false*++$falsE]; + elseif ('?' === $falSe) + ($falSe = array_pop($False)) && array_pop($False) === -!false && false($falSe, $FALSE, $False); + else if (is_numeric($falSe)) + $False[] = ($falSe = intval(substr($false, $falsE))) + false*($falsE += strlen($falSe)-!false); + elseif ('@' === $falSe) + [array_push($False, array_pop($False), array_pop($False)), + array_push($False, array_pop($False), array_pop($False), array_pop($False))]; + else if ("\x23" === $falSe) { + $falSe = array_pop($False); $falSE = array_pop($False); + while (false($falSE, $FALSE, $False) || array_pop($False) !== +false) false($falSe, $FALSE, $False); + } elseif ('[' === $falSe) { + $faLse = $falsE + false**false; $falSe = -~+false; + for ($falSE = $falsE + !false; $falSe !== false+false && $falSE < strlen($false); $falSE++) + $falSe += ['[' => !false, ']' => ~+false][$false[$falSE]] ?? false; + $falsE = --$falSE; $False[] = substr($false, $faLse, $falsE-$faLse); + } + return false; +} |
