[doc-en] master: Typographic fixes. (#4909)

From: Date: Tue, 07 Oct 2025 22:57:00 +0000
Subject: [doc-en] master: Typographic fixes. (#4909)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22792@lists.php.net to get a copy of this message
Author: Larry Garfield (Crell) Committer: GitHub (web-flow) Pusher: Crell Date: 2025-10-07T17:56:58-05:00 Commit: https://github.com/php/doc-en/commit/c999c7066ede7dc2df80e0bd3364bfa0ef1f9533 Raw diff: https://github.com/php/doc-en/commit/c999c7066ede7dc2df80e0bd3364bfa0ef1f9533.diff Typographic fixes. (#4909) Changed paths: M language/operators/functional.xml Diff: diff --git a/language/operators/functional.xml b/language/operators/functional.xml index db285c1cbf21..c58f3dfe7a05 100644 --- a/language/operators/functional.xml +++ b/language/operators/functional.xml @@ -3,7 +3,7 @@ <title>Functional Operators</title> <titleabbrev>Functional</titleabbrev> <para> - PHP 8.5 and later supports one operator that works directly on callables. The <literal>|></literal> + PHP 8.5 and later supports one operator that works directly on callables. The <literal>|&gt;</literal> operator, or “pipe,” accepts a single-parameter callable on the right and passes the left-side value to it, evaluating to the callable's result. The callable on the right may be any valid PHP callable: a <classname>Closure</classname>, @@ -13,15 +13,15 @@ <para> That means the following two lines are logically equivalent. <example> - <title>Using <literal>|></literal></title> + <title>Using <literal>|&gt;</literal></title> <programlisting role="php"> <![CDATA[ <?php $result = "Hello World" |> strlen(...); -print $result . PHP_EOL; +echo $result, PHP_EOL; $result = strlen("Hello World"); -print $result . PHP_EOL; +echo $result, PHP_EOL; ?> ]]> </programlisting> @@ -38,7 +38,7 @@ print $result . PHP_EOL; For a single call that is not especially useful. It becomes useful when multiple calls are chained together. That is, the following two code fragments are logically equivalent: <example> - <title>Chaining |> calls</title> + <title>Chaining |&gt; calls</title> <programlisting role="php"> <![CDATA[ <?php @@ -48,7 +48,7 @@ $result = "PHP Rocks" |> (fn($x) => array_map(strtoupper(...), $x)) |> (fn($x) => array_filter($x, fn($v) => $v != 'O')) ; -print $result . PHP_EOL; +echo $result, PHP_EOL; $temp = "PHP Rocks"; $temp = htmlentities($temp); @@ -56,7 +56,7 @@ $temp = str_split($temp); $temp = array_map(strtoupper(...), $temp); $temp = array_filter($temp, fn($v) => $v != 'O'); $result = $temp; -print $result . PHP_EOL; +echo $result, PHP_EOL; ?> ]]> </programlisting>

« previous php.doc.cvs (#22792) next »