diff --git a/core/lib/Drupal/Component/Gettext/PoStreamWriter.php b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php
index f5ffc85f97..5419b210aa 100644
--- a/core/lib/Drupal/Component/Gettext/PoStreamWriter.php
+++ b/core/lib/Drupal/Component/Gettext/PoStreamWriter.php
@@ -104,7 +104,7 @@ public function close() {
    *   If writing the data is not possible.
    */
   private function write($data) {
-    $result = fputs($this->_fd, $data);
+    $result = fwrite($this->_fd, $data);
     if ($result === FALSE) {
       throw new Exception('Unable to write data: ' . substr($data, 0, 20));
     }
diff --git a/core/lib/Drupal/Component/Utility/NestedArray.php b/core/lib/Drupal/Component/Utility/NestedArray.php
index c11d6a6582..36df7c7b1f 100644
--- a/core/lib/Drupal/Component/Utility/NestedArray.php
+++ b/core/lib/Drupal/Component/Utility/NestedArray.php
@@ -328,7 +328,7 @@ public static function mergeDeepArray(array $arrays, $preserve_integer_keys = FA
         // Renumber integer keys as array_merge_recursive() does unless
         // $preserve_integer_keys is set to TRUE. Note that PHP automatically
         // converts array keys that are integer strings (e.g., '1') to integers.
-        if (is_integer($key) && !$preserve_integer_keys) {
+        if (is_int($key) && !$preserve_integer_keys) {
           $result[] = $value;
         }
         // Recurse when both values are arrays.
diff --git a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
index 1fced2e479..e5361492b5 100644
--- a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
+++ b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
@@ -75,7 +75,7 @@ public function mail(array $message) {
     $mail_body = preg_replace('@\r?\n@', $line_endings, $message['body']);
     // For headers, PHP's API suggests that we use CRLF normally,
     // but some MTAs incorrectly replace LF with CRLF. See #234403.
-    $mail_headers = join("\n", $mimeheaders);
+    $mail_headers = implode("\n", $mimeheaders);
 
     $request = \Drupal::request();
 
diff --git a/core/modules/color/tests/src/Functional/ColorTest.php b/core/modules/color/tests/src/Functional/ColorTest.php
index 11ff1e737f..c11a92262e 100644
--- a/core/modules/color/tests/src/Functional/ColorTest.php
+++ b/core/modules/color/tests/src/Functional/ColorTest.php
@@ -117,7 +117,7 @@ public function _testColor($theme, $test_values) {
     $stylesheets = $this->config('color.theme.' . $theme)->get('stylesheets');
     foreach ($stylesheets as $stylesheet) {
       $this->assertPattern('|' . file_url_transform_relative(file_create_url($stylesheet)) . '|', 'Make sure the color stylesheet is included in the content. (' . $theme . ')');
-      $stylesheet_content = join("\n", file($stylesheet));
+      $stylesheet_content = implode("\n", file($stylesheet));
       $this->assertTrue(strpos($stylesheet_content, 'color: #123456') !== FALSE, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
     }
 
@@ -129,7 +129,7 @@ public function _testColor($theme, $test_values) {
     $this->drupalGet('<front>');
     $stylesheets = $this->config('color.theme.' . $theme)->get('stylesheets');
     foreach ($stylesheets as $stylesheet) {
-      $stylesheet_content = join("\n", file($stylesheet));
+      $stylesheet_content = implode("\n", file($stylesheet));
       $this->assertTrue(strpos($stylesheet_content, 'color: ' . $test_values['scheme_color']) !== FALSE, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
     }
 
@@ -141,7 +141,7 @@ public function _testColor($theme, $test_values) {
     $stylesheets = \Drupal::state()->get('drupal_css_cache_files') ?: [];
     $stylesheet_content = '';
     foreach ($stylesheets as $uri) {
-      $stylesheet_content .= join("\n", file(drupal_realpath($uri)));
+      $stylesheet_content .= implode("\n", file(drupal_realpath($uri)));
     }
     $this->assertTrue(strpos($stylesheet_content, 'public://') === FALSE, 'Make sure the color paths have been translated to local paths. (' . $theme . ')');
     $config->set('css.preprocess', 0);
diff --git a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
index 3e5f26b0e8..de8882e1e9 100644
--- a/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
+++ b/core/modules/comment/src/Tests/Views/DefaultViewRecentCommentsTest.php
@@ -130,7 +130,7 @@ public function testBlockDisplay() {
     $this->assertIdenticalResultset($view, $expected_result, $map);
 
     // Check the number of results given by the display is the expected.
-    $this->assertEqual(sizeof($view->result), $this->blockDisplayResults,
+    $this->assertEqual(count($view->result), $this->blockDisplayResults,
       format_string('There are exactly @results comments. Expected @expected',
         ['@results' => count($view->result), '@expected' => $this->blockDisplayResults]
       )
diff --git a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
index e354f00871..5d772a98ce 100644
--- a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
+++ b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php
@@ -135,7 +135,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
           $values['title'] = mt_rand(0, 1) ? $random->sentences(4) : '';
           break;
       }
-      $values['uri'] = 'http://www.' . $random->word($domain_length) . '.' . $tlds[mt_rand(0, (sizeof($tlds) - 1))];
+      $values['uri'] = 'http://www.' . $random->word($domain_length) . '.' . $tlds[mt_rand(0, (count($tlds) - 1))];
     }
     else {
       $values['uri'] = 'base:' . $random->name(mt_rand(1, 64));
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 27034dc219..2213e9347d 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -363,7 +363,7 @@ function simpletest_phpunit_run_command(array $unescaped_test_classnames, $phpun
 
   // exec in a subshell so that the environment is isolated when running tests
   // via the simpletest UI.
-  $ret = exec(join($command, " "), $output, $status);
+  $ret = exec(implode(" ", $command), $output, $status);
 
   chdir($old_cwd);
   putenv('SIMPLETEST_DB=');
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 33fa077e2c..db361f3971 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -897,7 +897,7 @@ function system_requirements($phase) {
       $requirements['trusted_host_patterns'] = [
         'title' => t('Trusted Host Settings'),
         'value' => t('Enabled'),
-        'description' => t('The trusted_host_patterns setting is set to allow %trusted_host_patterns', ['%trusted_host_patterns' => join(', ', $trusted_host_patterns)]),
+        'description' => t('The trusted_host_patterns setting is set to allow %trusted_host_patterns', ['%trusted_host_patterns' => implode(', ', $trusted_host_patterns)]),
       ];
     }
   }
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index bde03467a7..a9ca4c3dd8 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -1383,7 +1383,7 @@ function system_time_zones($blank = NULL, $grouped = FALSE) {
       $city = array_pop($split);
       $region = array_shift($split);
       if (!empty($region)) {
-        $grouped_zones[$region][$key] = empty($split) ? $city : $city . ' (' . join('/', $split) . ')';
+        $grouped_zones[$region][$key] = empty($split) ? $city : $city . ' (' . implode('/', $split) . ')';
       }
       else {
         $grouped_zones[$key] = $value;
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 8475e3f0fe..32f050786a 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -88,6 +88,7 @@
   </rule>
   <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Scope/MethodScopeSniff.php"/>
   <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/EmptyInstallSniff.php"/>
+  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php"/>
   <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionTSniff.php">
     <exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/>
     <exclude name="Drupal.Semantics.FunctionT.ConcatString"/>
diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
index e0badd88d1..875ca7a4fa 100644
--- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php
@@ -39,7 +39,7 @@ public function testGarbageCollection() {
     for ($i = 0; $i <= 3; $i++) {
       $store->setWithExpire('key_' . $i, $this->randomObject(), rand(500, 100000));
     }
-    $this->assertIdentical(sizeof($store->getAll()), 4, 'Four items were written to the storage.');
+    $this->assertIdentical(count($store->getAll()), 4, 'Four items were written to the storage.');
 
     // Manually expire the data.
     for ($i = 0; $i <= 3; $i++) {
