How can one ensure that PHP methods are still called when adding additional variables to a PHP string?

When adding additional variables to a PHP string, it's important to enclose the variables within curly braces {} to ensure that PHP methods are still called. This syntax allows PHP to properly parse and evaluate the variables within the string.

// Ensure that PHP methods are still called when adding additional variables to a PHP string
$variable1 = "Hello";
$variable2 = "World";

// Enclose variables within curly braces to call PHP methods
$string = "{$variable1} strtoupper($variable2)";

echo $string; // Output: Hello WORLD