diff --git a/core/lib/Drupal/Core/Mail/MailManager.php b/core/lib/Drupal/Core/Mail/MailManager.php
index 8ba671d50f5cddc228dfcf84df6b36c95ca73f96..ea819c0c11db4baa2f136346f1f4a7e08435b3fc 100644
--- a/core/lib/Drupal/Core/Mail/MailManager.php
+++ b/core/lib/Drupal/Core/Mail/MailManager.php
@@ -101,7 +101,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
    * by one module, set the plugin ID as the value for the key corresponding to
    * the module name. To specify a plugin for a particular message sent by one
    * module, set the plugin ID as the value for the array key that is the
-   * message ID, which is "${module}_${key}".
+   * message ID, which is "{$module}_{$key}".
    *
    * For example to debug all mail sent by the user module by logging it to a
    * file, you might set the variable as something like:
diff --git a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
index 78a565d0f81d79bc20cdc87ecbabff8beee9a9a0..52367794517847e663b96647e3480472b80ce556 100644
--- a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
+++ b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php
@@ -133,18 +133,18 @@ public function testNumberFormatter() {
     $scale = rand(0, 10);
 
     $page = $this->getSession()->getPage();
-    $page->pressButton("${float_field}_settings_edit");
+    $page->pressButton("{$float_field}_settings_edit");
     $assert_session->waitForElement('css', '.ajax-new-content');
     $edit = [
-      "fields[${float_field}][settings_edit_form][settings][prefix_suffix]" => TRUE,
-      "fields[${float_field}][settings_edit_form][settings][scale]" => $scale,
-      "fields[${float_field}][settings_edit_form][settings][decimal_separator]" => $decimal_separator,
-      "fields[${float_field}][settings_edit_form][settings][thousand_separator]" => $thousand_separator,
+      "fields[{$float_field}][settings_edit_form][settings][prefix_suffix]" => TRUE,
+      "fields[{$float_field}][settings_edit_form][settings][scale]" => $scale,
+      "fields[{$float_field}][settings_edit_form][settings][decimal_separator]" => $decimal_separator,
+      "fields[{$float_field}][settings_edit_form][settings][thousand_separator]" => $thousand_separator,
     ];
     foreach ($edit as $name => $value) {
       $page->fillField($name, $value);
     }
-    $page->pressButton("${float_field}_plugin_settings_update");
+    $page->pressButton("{$float_field}_plugin_settings_update");
     $assert_session->waitForElement('css', '.field-plugin-summary-cell > .ajax-new-content');
     $this->submitForm([], 'Save');
 
@@ -165,16 +165,16 @@ public function testNumberFormatter() {
     $thousand_separator = $thousand_separators[array_rand($thousand_separators)];
 
     $page = $this->getSession()->getPage();
-    $page->pressButton("${integer_field}_settings_edit");
+    $page->pressButton("{$integer_field}_settings_edit");
     $assert_session->waitForElement('css', '.ajax-new-content');
     $edit = [
-      "fields[${integer_field}][settings_edit_form][settings][prefix_suffix]" => FALSE,
-      "fields[${integer_field}][settings_edit_form][settings][thousand_separator]" => $thousand_separator,
+      "fields[{$integer_field}][settings_edit_form][settings][prefix_suffix]" => FALSE,
+      "fields[{$integer_field}][settings_edit_form][settings][thousand_separator]" => $thousand_separator,
     ];
     foreach ($edit as $name => $value) {
       $page->fillField($name, $value);
     }
-    $page->pressButton("${integer_field}_plugin_settings_update");
+    $page->pressButton("{$integer_field}_plugin_settings_update");
     $assert_session->waitForElement('css', '.field-plugin-summary-cell > .ajax-new-content');
     $this->submitForm([], 'Save');
 
diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
index a65210607c0a6fb9a734467451a083d9bf5d427b..d3a262fd017b42b6016ec4997c5d5fe482666f5d 100644
--- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
@@ -262,7 +262,7 @@ public function testLoggerException() {
 
     $expected_path = \Drupal::root() . '/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php';
     $expected_line = 62;
-    $expected_entry = "Failed to log error: Exception: Deforestation in Drupal\\error_service_test\\MonkeysInTheControlRoom->handle() (line ${expected_line} of ${expected_path})";
+    $expected_entry = "Failed to log error: Exception: Deforestation in Drupal\\error_service_test\\MonkeysInTheControlRoom->handle() (line {$expected_line} of {$expected_path})";
     $this->assertStringContainsString($expected_entry, $errors[0], 'Original error logged to the PHP error log when an exception is thrown by a logger');
 
     // The exception is expected. Do not interpret it as a test failure. Not
diff --git a/core/tests/TestSuites/TestSuiteBase.php b/core/tests/TestSuites/TestSuiteBase.php
index 06cfc537e967c6e5e47233d8a13b99004e92d574..bd68d3d9886b92b1b67522b9bab788fcd2d937ad 100644
--- a/core/tests/TestSuites/TestSuiteBase.php
+++ b/core/tests/TestSuites/TestSuiteBase.php
@@ -37,8 +37,8 @@ protected function findExtensionDirectories($root) {
    *   SubNamespace used to separate test suite. Examples: Unit, Functional.
    */
   protected function addTestsBySuiteNamespace($root, $suite_namespace) {
-    // Core's tests are in the namespace Drupal\${suite_namespace}Tests\ and are
-    // always inside of core/tests/Drupal/${suite_namespace}Tests. The exception
+    // Core's tests are in the namespace Drupal\{$suite_namespace}Tests\ and are
+    // always inside of core/tests/Drupal/{$suite_namespace}Tests. The exception
     // to this is Unit tests for historical reasons.
     if ($suite_namespace == 'Unit') {
       $tests = TestDiscovery::scanDirectory("Drupal\\Tests\\", "$root/core/tests/Drupal/Tests");
@@ -50,7 +50,7 @@ protected function addTestsBySuiteNamespace($root, $suite_namespace) {
       $this->addTestFiles($tests);
     }
     else {
-      $this->addTestFiles(TestDiscovery::scanDirectory("Drupal\\${suite_namespace}Tests\\", "$root/core/tests/Drupal/${suite_namespace}Tests"));
+      $this->addTestFiles(TestDiscovery::scanDirectory("Drupal\\{$suite_namespace}Tests\\", "$root/core/tests/Drupal/{$suite_namespace}Tests"));
     }
 
     // Extensions' tests will always be in the namespace