[DOC-CVS] [doc-en] master: reflection: ReflectionFunction::__construct() example expects bool param

[email protected] (Richard Bairwell via GitHub) Fri, 5 Jun 2026 12:56:18 +0000
Newsgroups php.doc.cvs
Message-ID <zpToCCG1T8lVHkKLK05iQPwbhn1YCo9XMAn0sLiZpqg@main.internal.php.net>
Author: Richard Bairwell (rbairwell)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-06-05T14:56:15+02:00

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

reflection: ReflectionFunction::__construct() example expects bool param

var_export accepts a boolean as its second argument - passing "1" in causes warnings if strict_types is enabled.

Changed the second argument to the two var_export calls to "true".

Changed paths:
  M  reference/reflection/reflectionfunction/construct.xml


Diff:

diff --git a/reference/reflection/reflectionfunction/construct.xml b/reference/reflection/reflectionfunction/construct.xml
index d45e696b40c5..957fef8eb763 100644
--- a/reference/reflection/reflectionfunction/construct.xml
+++ b/reference/reflection/reflectionfunction/construct.xml
@@ -87,12 +87,12 @@ function dumpReflectionFunction($func)
     );
 
     // Print documentation comment
-    printf("---> Documentation:\n %s\n", var_export($func->getDocComment(), 1));
+    printf("---> Documentation:\n %s\n", var_export($func->getDocComment(), true));
 
     // Print static variables if existent
     if ($statics = $func->getStaticVariables())
     {
-        printf("---> Static variables: %s\n", var_export($statics, 1));
+        printf("---> Static variables: %s\n", var_export($statics, true));
     }
 }