Skip to content

Commit

Permalink
Change print to echo
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad authored and Girgias committed Feb 22, 2025
1 parent a16ad38 commit 49ef347
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions reference/reflection/reflectionproperty/getrawvalue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ $rClass = new \ReflectionClass(Example::class);
$rProp = $rClass->getProperty('tag');
// These would go through the get hook, so would produce "php".
print $example->tag;
print "\n";
print $rProp->getValue($example);
print "\n";
echo $example->tag;
echo "\n";
echo $rProp->getValue($example);
echo "\n";
// But this would bypass the hook and produce "PHP".
print $rProp->getRawValue($example);
echo $rProp->getRawValue($example);
?>
]]>
</programlisting>
Expand Down
6 changes: 3 additions & 3 deletions reference/reflection/reflectionproperty/setrawvalue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ $rProp = $rClass->getProperty('age');
try {
$example->age = -2;
} catch (InvalidArgumentException) {
print "InvalidArgumentException for setting property to -2\n";
echo "InvalidArgumentException for setting property to -2\n";
}
try {
$rProp->setValue($example, -2);
} catch (InvalidArgumentException) {
print "InvalidArgumentException for using ReflectionProperty::setValue() with -2\n";
echo "InvalidArgumentException for using ReflectionProperty::setValue() with -2\n";
}
// But this would set the $age to -2 without error.
$rProp->setRawValue($example, -2);
print $example->age;
echo $example->age;
?>
]]>
</programlisting>
Expand Down

0 comments on commit 49ef347

Please sign in to comment.