Either use `sprintf("Family: %s !== %s", $family, $result->device->family)` or `'family: ' . $family . ' !== ' . $result->device->family`.