Skip to content

Commit 6c9535b

Browse files
committed
Typographic fixes.
php/doc-en@c999c70
1 parent b3226d1 commit 6c9535b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

language/operators/functional.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 2946c8a267734a9e8696e1764f7436e6caa8909c Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: c999c7066ede7dc2df80e0bd3364bfa0ef1f9533 Maintainer: mumumu Status: ready -->
44
<sect1 xml:id="language.operators.functional">
55
<title>パイプ演算子</title>
66
<titleabbrev>パイプ演算子</titleabbrev>
77
<para>
88
PHP 8.5 以降では、callable に直接値を渡す演算子をサポートしています。
9-
<literal>|></literal> 演算子、または "パイプ" は、右辺にパラメーターをひとつ取る
9+
<literal>|&gt;</literal> 演算子、または "パイプ" は、右辺にパラメーターをひとつ取る
1010
callable を受け入れ、左辺値をそれに渡し、callable の結果を評価します。
1111
右辺の callable は、有効な PHP の callable であれば何でも構いません:
1212
つまり、<classname>Closure</classname>、
@@ -16,15 +16,15 @@
1616
<para>
1717
論理的には同じ意味になる、2行のコードを以下に示します。
1818
<example>
19-
<title><literal>|></literal> を使う</title>
19+
<title><literal>|&gt;</literal> を使う</title>
2020
<programlisting role="php">
2121
<![CDATA[
2222
<?php
2323
$result = "Hello World" |> strlen(...);
24-
print $result . PHP_EOL;
24+
echo $result, PHP_EOL;
2525
2626
$result = strlen("Hello World");
27-
print $result . PHP_EOL;
27+
echo $result, PHP_EOL;
2828
?>
2929
]]>
3030
</programlisting>
@@ -42,7 +42,7 @@ print $result . PHP_EOL;
4242
複数の呼び出しを一緒にチェインさせると役に立ちます。
4343
たとえば、論理的には同じ意味になるコード片を2つ、以下に示します:
4444
<example>
45-
<title>|> の呼び出しをチェインさせる</title>
45+
<title>|&gt; の呼び出しをチェインさせる</title>
4646
<programlisting role="php">
4747
<![CDATA[
4848
<?php
@@ -52,15 +52,15 @@ $result = "PHP Rocks"
5252
|> (fn($x) => array_map(strtoupper(...), $x))
5353
|> (fn($x) => array_filter($x, fn($v) => $v != 'O'))
5454
;
55-
print $result . PHP_EOL;
55+
echo $result, PHP_EOL;
5656
5757
$temp = "PHP Rocks";
5858
$temp = htmlentities($temp);
5959
$temp = str_split($temp);
6060
$temp = array_map(strtoupper(...), $temp);
6161
$temp = array_filter($temp, fn($v) => $v != 'O');
6262
$result = $temp;
63-
print $result . PHP_EOL;
63+
echo $result, PHP_EOL;
6464
?>
6565
]]>
6666
</programlisting>

0 commit comments

Comments
 (0)