[DOC-CVS] [doc-en] master: Fixed example so that it runs

[email protected] (Derick Rethans)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Derick Rethans (derickr)
Date: 2025-11-27T16:42:15Z

Commit: https://github.com/php/doc-en/commit/2f1812217524ac60414745bad05cbbee00262b3b
Raw diff: https://github.com/php/doc-en/commit/2f1812217524ac60414745bad05cbbee00262b3b.diff

Fixed example so that it runs

Changed paths:
  M  language/operators/functional.xml


Diff:

diff --git a/language/operators/functional.xml b/language/operators/functional.xml
index c58f3dfe7a05..e44fa25d1faf 100644
--- a/language/operators/functional.xml
+++ b/language/operators/functional.xml
@@ -48,7 +48,7 @@ $result = "PHP Rocks"
     |> (fn($x) => array_map(strtoupper(...), $x))
     |> (fn($x) => array_filter($x, fn($v) => $v != 'O'))
 ;
-echo $result, PHP_EOL;
+print_r($result);
 
 $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;
-echo $result, PHP_EOL;
+print_r($result);
 ?>
 ]]>
    </programlisting>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.