[DOC-CVS] [doc-en] master: add error message, use yoda style you should not

[email protected] (Karoly Negyesi)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Karoly Negyesi (chx)
Date: 2026-02-05T12:30:30+01:00

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

add error message, use yoda style you should not

Changed paths:
  M  language/predefined/closure/getcurrent.xml


Diff:

diff --git a/language/predefined/closure/getcurrent.xml b/language/predefined/closure/getcurrent.xml
index fe8395fd17d0..81cf05dbb947 100644
--- a/language/predefined/closure/getcurrent.xml
+++ b/language/predefined/closure/getcurrent.xml
@@ -19,7 +19,7 @@
   </para>
   <para>
    This method must be called from within a closure; calling it outside of a
-   closure context will result in an error.
+   closure context will result in Error: Current function is not a closure.
   </para>
  </refsect1>
 
@@ -55,7 +55,7 @@
 <![CDATA[
 <?php
 $fibonacci = function (int $n) {
-    if (0 === $n || 1 === $n) {
+    if ($n === 0 || $n === 1) {
         return $n;
     }
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.