diff --git a/core/lib/Drupal/Component/Diff/Diff.php b/core/lib/Drupal/Component/Diff/Diff.php
index 8135b15825..b318a3a20e 100644
--- a/core/lib/Drupal/Component/Diff/Diff.php
+++ b/core/lib/Drupal/Component/Diff/Diff.php
@@ -83,7 +83,7 @@ public function lcs() {
     $lcs = 0;
     foreach ($this->edits as $edit) {
       if ($edit->type == 'copy') {
-        $lcs += sizeof($edit->orig);
+        $lcs += count($edit->orig);
       }
     }
     return $lcs;
@@ -102,7 +102,7 @@ public function orig() {
 
     foreach ($this->edits as $edit) {
       if ($edit->orig) {
-        array_splice($lines, sizeof($lines), 0, $edit->orig);
+        array_splice($lines, count($lines), 0, $edit->orig);
       }
     }
     return $lines;
@@ -121,7 +121,7 @@ public function closing() {
 
     foreach ($this->edits as $edit) {
       if ($edit->closing) {
-        array_splice($lines, sizeof($lines), 0, $edit->closing);
+        array_splice($lines, count($lines), 0, $edit->closing);
       }
     }
     return $lines;
diff --git a/core/lib/Drupal/Component/Diff/DiffFormatter.php b/core/lib/Drupal/Component/Diff/DiffFormatter.php
index d70f3e61ad..640c28f68f 100644
--- a/core/lib/Drupal/Component/Diff/DiffFormatter.php
+++ b/core/lib/Drupal/Component/Diff/DiffFormatter.php
@@ -68,7 +68,7 @@ public function format(Diff $diff) {
     foreach ($diff->getEdits() as $edit) {
       if ($edit->type == 'copy') {
         if (is_array($block)) {
-          if (sizeof($edit->orig) <= $nlead + $ntrail) {
+          if (count($edit->orig) <= $nlead + $ntrail) {
             $block[] = $edit;
           }
           else {
@@ -84,9 +84,9 @@ public function format(Diff $diff) {
       }
       else {
         if (!is_array($block)) {
-          $context = array_slice($context, sizeof($context) - $nlead);
-          $x0 = $xi - sizeof($context);
-          $y0 = $yi - sizeof($context);
+          $context = array_slice($context, count($context) - $nlead);
+          $x0 = $xi - count($context);
+          $y0 = $yi - count($context);
           $block = [];
           if ($context) {
             $block[] = new DiffOpCopy($context);
@@ -96,10 +96,10 @@ public function format(Diff $diff) {
       }
 
       if ($edit->orig) {
-        $xi += sizeof($edit->orig);
+        $xi += count($edit->orig);
       }
       if ($edit->closing) {
-        $yi += sizeof($edit->closing);
+        $yi += count($edit->closing);
       }
     }
 
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
index dadde4e51e..a05052d641 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
@@ -35,8 +35,8 @@ class DiffEngine {
 
   public function diff($from_lines, $to_lines) {
 
-    $n_from = sizeof($from_lines);
-    $n_to = sizeof($to_lines);
+    $n_from = count($from_lines);
+    $n_to = count($to_lines);
 
     $this->xchanged = $this->ychanged = [];
     $this->xv = $this->yv = [];
@@ -86,7 +86,7 @@ public function diff($from_lines, $to_lines) {
     }
 
     // Find the LCS.
-    $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
+    $this->_compareseq(0, count($this->xv), 0, count($this->yv));
 
     // Merge edits when possible
     $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
@@ -343,9 +343,9 @@ protected function _shift_boundaries($lines, &$changed, $other_changed) {
     $i = 0;
     $j = 0;
 
-    $this::USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
-    $len = sizeof($lines);
-    $other_len = sizeof($other_changed);
+    $this::USE_ASSERTS && assert('count($lines) == count($changed)');
+    $len = count($lines);
+    $other_len = count($other_changed);
 
     while (1) {
       /*
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
index 29d749dc7c..7d2b0f50e1 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
@@ -17,11 +17,11 @@ public function reverse() {
   }
 
   public function norig() {
-    return $this->orig ? sizeof($this->orig) : 0;
+    return $this->orig ? count($this->orig) : 0;
   }
 
   public function nclosing() {
-    return $this->closing ? sizeof($this->closing) : 0;
+    return $this->closing ? count($this->closing) : 0;
   }
 
 }
diff --git a/core/lib/Drupal/Component/Diff/MappedDiff.php b/core/lib/Drupal/Component/Diff/MappedDiff.php
index 32b38995d7..41fbe4b623 100644
--- a/core/lib/Drupal/Component/Diff/MappedDiff.php
+++ b/core/lib/Drupal/Component/Diff/MappedDiff.php
@@ -33,23 +33,23 @@ class MappedDiff extends Diff {
    */
   public function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
 
-    assert(sizeof($from_lines) == sizeof($mapped_from_lines));
-    assert(sizeof($to_lines) == sizeof($mapped_to_lines));
+    assert(count($from_lines) == count($mapped_from_lines));
+    assert(count($to_lines) == count($mapped_to_lines));
 
     parent::__construct($mapped_from_lines, $mapped_to_lines);
 
     $xi = $yi = 0;
-    for ($i = 0; $i < sizeof($this->edits); $i++) {
+    for ($i = 0; $i < count($this->edits); $i++) {
       $orig = &$this->edits[$i]->orig;
       if (is_array($orig)) {
-        $orig = array_slice($from_lines, $xi, sizeof($orig));
-        $xi += sizeof($orig);
+        $orig = array_slice($from_lines, $xi, count($orig));
+        $xi += count($orig);
       }
 
       $closing = &$this->edits[$i]->closing;
       if (is_array($closing)) {
-        $closing = array_slice($to_lines, $yi, sizeof($closing));
-        $yi += sizeof($closing);
+        $closing = array_slice($to_lines, $yi, count($closing));
+        $yi += count($closing);
       }
     }
   }
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 83d7feb699..e683987260 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 3c8332e367..97d6d82a83 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -896,7 +896,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 d327d4e74b..86ff8662e4 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 b9180d7b63..765c798012 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -83,6 +83,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.BackslashSingleQuote"/>
     <exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/>
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++) {
