Input:
<?php
class test {
public function test_method() {
$customer = (object) [ 'name' => 'Bob' ];
$job = (object) [ 'customer' => $customer ];
return "The customer for that job, {$job->customer->name}.";
}
}
Output
<?php
class test
{
public function test_method()
{
$customer = (object) ['name' => 'Bob'];
$job = (object) ['customer' => $customer];
return "The customer for that job, $job->customer->name.";
}
}
Expected output:
<?php
class test
{
public function test_method()
{
$customer = (object) ['name' => 'Bob'];
$job = (object) ['customer' => $customer];
return "The customer for that job, {$job->customer->name}.";
}
}
Input:
Output
Expected output: