What, if anything, is the minimum change (fewest inserted/deleted/modified characters) required to make the output The result is bar:
<?php
class A {
private $foo = "bar";
public function __toString() {
return $this->foo;
}
}
$myObject = new A();
echo "The result is " . $myObject;
?>
echo "The result is " , $myObject;

Leave a Reply