aboutsummaryrefslogtreecommitdiffhomepage
path: root/Q2.php
blob: b6c3c6ba3a99b71cb6477a442cd78f2fb37a8827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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;
}