Skip to content

Commit c1aba02

Browse files
authored
Fixed function argument in example (#3267)
In strict mode: Fatal error: Uncaught TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
1 parent 4697ce9 commit c1aba02

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

reference/reflection/reflectionproperty/construct.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<programlisting role="php">
5656
<![CDATA[
5757
<?php
58+
5859
class Str
5960
{
6061
public $length = 5;
@@ -73,7 +74,7 @@ printf(
7374
$prop->isStatic() ? ' static' : '',
7475
$prop->getName(),
7576
$prop->isDefault() ? 'declared at compile-time' : 'created at run-time',
76-
var_export(Reflection::getModifierNames($prop->getModifiers()), 1)
77+
var_export(Reflection::getModifierNames($prop->getModifiers()), true)
7778
);
7879
7980
// Create an instance of Str
@@ -90,6 +91,7 @@ var_dump($prop->getValue($obj));
9091
9192
// Dump object
9293
var_dump($obj);
94+
9395
?>
9496
]]>
9597
</programlisting>
@@ -115,7 +117,8 @@ object(Str)#2 (1) {
115117
<![CDATA[
116118
<?php
117119
118-
class Foo {
120+
class Foo
121+
{
119122
public $x = 1;
120123
protected $y = 2;
121124
private $z = 3;

0 commit comments

Comments
 (0)