aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-12 15:12:10 +0900
committernsfisis <nsfisis@gmail.com>2023-03-12 15:12:10 +0900
commitde13d68cddef5bb321469bcffb868f27ddd5390e (patch)
tree3183bb2bc8b2ad7d34b6953e6a248747239f0afa /public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html
parent5b49e6bca39d7cd3b98db8b826dc597d9f758a26 (diff)
downloadblog.nsfisis.dev-de13d68cddef5bb321469bcffb868f27ddd5390e.tar.gz
blog.nsfisis.dev-de13d68cddef5bb321469bcffb868f27ddd5390e.tar.zst
blog.nsfisis.dev-de13d68cddef5bb321469bcffb868f27ddd5390e.zip
style: add .highlight class to pre tag
Diffstat (limited to 'public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html')
-rw-r--r--public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html b/public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html
index f080c5e..7aa97a9 100644
--- a/public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html
+++ b/public/posts/2022-11-19/phperkaigi-2023-unused-token-quiz-2/index.html
@@ -72,7 +72,7 @@
注意: これはボツ問なので、得られたトークンを PHPerKaigi で入力してもポイントにはならない。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
@@ -96,7 +96,7 @@
実行してみると、次のような出力が得られる。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>#
&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
@@ -113,7 +113,7 @@
1 行目を除き、先ほどのコードとほぼ同じものが出てきた。もう一度実行してみる。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>#
W
&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;​&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;
@@ -130,7 +130,7 @@ W
今度は 2 行目が書き換えられた。すべての行が変化するまで繰り返すと次のようになる。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>#
W
E
@@ -158,7 +158,7 @@ P</code>
Vim で開くと次のようになる (1 行目を抜粋)。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;&lt;200b&gt;&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=&apos;&lt;200b&gt;&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;&lt;200b&gt;&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;</code>
</pre>
@@ -185,7 +185,7 @@ P</code>
続いて、トークンへの変換ロジックを解析する。注目すべきはこの部分だ。以下、ゼロ幅スペースは Vim での表示に合わせて<code>&lt;200b&gt;</code>と記載する。
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>fn($s)=&gt;chr(strlen($s)/3)</code>
</pre>
@@ -193,7 +193,7 @@ P</code>
PHP の<code>strlen()</code>は文字列のバイト数を返す。1 行目の<code>$s</code>は以下の内容となっており、
</p>
- <pre language="php" linenumbering="unnumbered">
+ <pre class="highlight" language="php" linenumbering="unnumbered">
<code>$s=&apos;&lt;200b&gt;&lt;?php printf((isset($s)?fn($s)=&gt;trim($s,&quot;&lt;200b&gt;&quot;):fn($s)=&gt;chr(strlen($s)/3))($s=%s).&quot;\n&quot;,&quot;\x27$s\x27&quot;);?&gt;&apos;</code>
</pre>