diff --git a/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
index d0e4faf126..926b35d8e3 100644
--- a/core/lib/Drupal/Component/Datetime/DateTimePlus.php
+++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
@@ -543,21 +543,21 @@ public static function arrayToISO($array, $force_valid_date = FALSE) {
     $array = static::prepareArray($array, $force_valid_date);
     $input_time = '';
     if ($array['year'] !== '') {
-      $input_time = static::datePad(intval($array['year']), 4);
+      $input_time = static::datePad((int)$array['year'], 4);
       if ($force_valid_date || $array['month'] !== '') {
-        $input_time .= '-' . static::datePad(intval($array['month']));
+        $input_time .= '-' . static::datePad((int)$array['month']);
         if ($force_valid_date || $array['day'] !== '') {
-          $input_time .= '-' . static::datePad(intval($array['day']));
+          $input_time .= '-' . static::datePad((int)$array['day']);
         }
       }
     }
     if ($array['hour'] !== '') {
       $input_time .= $input_time ? 'T' : '';
-      $input_time .= static::datePad(intval($array['hour']));
+      $input_time .= static::datePad((int)$array['hour']);
       if ($force_valid_date || $array['minute'] !== '') {
-        $input_time .= ':' . static::datePad(intval($array['minute']));
+        $input_time .= ':' . static::datePad((int)$array['minute']);
         if ($force_valid_date || $array['second'] !== '') {
-          $input_time .= ':' . static::datePad(intval($array['second']));
+          $input_time .= ':' . static::datePad((int)$array['second']);
         }
       }
     }
diff --git a/core/lib/Drupal/Core/Datetime/DateHelper.php b/core/lib/Drupal/Core/Datetime/DateHelper.php
index b3a8ce75d6..bdbe3ccc60 100644
--- a/core/lib/Drupal/Core/Datetime/DateHelper.php
+++ b/core/lib/Drupal/Core/Datetime/DateHelper.php
@@ -291,10 +291,10 @@ public static function weekDaysOrdered($weekdays) {
   public static function years($min = 0, $max = 0, $required = FALSE) {
     // Ensure $min and $max are valid values.
     if (empty($min)) {
-      $min = intval(date('Y', REQUEST_TIME) - 3);
+      $min = (int)(date('Y', REQUEST_TIME) - 3);
     }
     if (empty($max)) {
-      $max = intval(date('Y', REQUEST_TIME) + 3);
+      $max = (int)(date('Y', REQUEST_TIME) + 3);
     }
     $none = ['' => ''];
     $range = range($min, $max);
diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
index 6f110d395f..911cbe3aa2 100644
--- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php
+++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
@@ -255,7 +255,7 @@ public static function processDatelist(&$element, FormStateInterface $form_state
       $default = isset($element['#value'][$part]) && trim($element['#value'][$part]) != '' ? $element['#value'][$part] : '';
       $value = $date instanceof DrupalDateTime && !$date->hasErrors() ? $date->format($format) : $default;
       if (!empty($value) && $part != 'ampm') {
-        $value = intval($value);
+        $value = (int)$value;
       }
 
       $element['#attributes']['title'] = $title;
@@ -368,15 +368,15 @@ protected static function checkEmptyInputs($input, $parts) {
   protected static function incrementRound(&$date, $increment) {
     // Round minutes and seconds, if necessary.
     if ($date instanceof DrupalDateTime && $increment > 1) {
-      $day = intval($date->format('j'));
-      $hour = intval($date->format('H'));
-      $second = intval(round(intval($date->format('s')) / $increment) * $increment);
-      $minute = intval($date->format('i'));
+      $day = (int)$date->format('j');
+      $hour = (int)$date->format('H');
+      $second = (int)(round((int)$date->format('s') / $increment) * $increment);
+      $minute = (int)$date->format('i');
       if ($second == 60) {
         $minute += 1;
         $second = 0;
       }
-      $minute = intval(round($minute / $increment) * $increment);
+      $minute = (int)(round($minute / $increment) * $increment);
       if ($minute == 60) {
         $hour += 1;
         $minute = 0;
diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php
index 66e717eaba..4db787306c 100644
--- a/core/modules/book/src/Form/BookAdminEditForm.php
+++ b/core/modules/book/src/Form/BookAdminEditForm.php
@@ -200,7 +200,7 @@ protected function bookAdminTable(NodeInterface $node, array &$form) {
   protected function bookAdminTableTree(array $tree, array &$form) {
     // The delta must be big enough to give each node a distinct value.
     $count = count($tree);
-    $delta = ($count < 30) ? 15 : intval($count / 2) + 1;
+    $delta = ($count < 30) ? 15 : (int)($count / 2) + 1;
 
     $access = \Drupal::currentUser()->hasPermission('administer nodes');
     $destination = $this->getDestinationArray();
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 9e424484b8..73e303fffe 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -728,7 +728,7 @@ function locale_form_language_admin_edit_form_alter(&$form, FormStateInterface $
  * Form submission handler for language_admin_edit_form().
  */
 function locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state) {
-  \Drupal::configFactory()->getEditable('locale.settings')->set('translate_english', intval($form_state->getValue('locale_translate_english')))->save();
+  \Drupal::configFactory()->getEditable('locale.settings')->set('translate_english', (int)$form_state->getValue('locale_translate_english'))->save();
 }
 
 /**
diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php
index dde95027bd..dd3c3dd556 100644
--- a/core/modules/menu_ui/src/Tests/MenuTest.php
+++ b/core/modules/menu_ui/src/Tests/MenuTest.php
@@ -426,7 +426,7 @@ public function doMenuTests() {
     // item's weight doesn't get changed because of the old hardcoded delta=50.
     $items = [];
     for ($i = -50; $i <= 51; $i++) {
-      $items[$i] = $this->addMenuLink('', '/node/' . $node1->id(), $menu_name, TRUE, strval($i));
+      $items[$i] = $this->addMenuLink('', '/node/' . $node1->id(), $menu_name, TRUE, (string)$i);
     }
     $this->assertMenuLink($items[51]->getPluginId(), ['weight' => '51']);
 
diff --git a/core/modules/migrate/src/Plugin/migrate/process/Explode.php b/core/modules/migrate/src/Plugin/migrate/process/Explode.php
index 536a9e1b0a..8931d69481 100644
--- a/core/modules/migrate/src/Plugin/migrate/process/Explode.php
+++ b/core/modules/migrate/src/Plugin/migrate/process/Explode.php
@@ -108,7 +108,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
     elseif (!$strict) {
       // Check if the incoming value can cast to a string.
       $original = $value;
-      if (!is_string($original) && ($original != ($value = @strval($value)))) {
+      if (!is_string($original) && ($original != ($value = @(string)$value))) {
         throw new MigrateException(sprintf('%s cannot be casted to a string', var_export($original, TRUE)));
       }
       // Empty strings should be exploded to empty arrays.
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
index e127dfbdc8..c5c5fade01 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/Variable.php
@@ -59,7 +59,7 @@ protected function values() {
    * {@inheritdoc}
    */
   public function count($refresh = FALSE) {
-    return intval($this->query()->countQuery()->execute()->fetchField() > 0);
+    return (int)($this->query()->countQuery()->execute()->fetchField() > 0);
   }
 
   /**
diff --git a/core/modules/node/node.views_execution.inc b/core/modules/node/node.views_execution.inc
index 4d834a11e3..2a4d7ed705 100644
--- a/core/modules/node/node.views_execution.inc
+++ b/core/modules/node/node.views_execution.inc
@@ -15,9 +15,9 @@
 function node_views_query_substitutions(ViewExecutable $view) {
   $account = \Drupal::currentUser();
   return [
-    '***ADMINISTER_NODES***' => intval($account->hasPermission('administer nodes')),
-    '***VIEW_OWN_UNPUBLISHED_NODES***' => intval($account->hasPermission('view own unpublished content')),
-    '***BYPASS_NODE_ACCESS***' => intval($account->hasPermission('bypass node access')),
+    '***ADMINISTER_NODES***' => (int)$account->hasPermission('administer nodes'),
+    '***VIEW_OWN_UNPUBLISHED_NODES***' => (int)$account->hasPermission('view own unpublished content'),
+    '***BYPASS_NODE_ACCESS***' => (int)$account->hasPermission('bypass node access'),
   ];
 }
 
diff --git a/core/modules/node/src/Plugin/Action/AssignOwnerNode.php b/core/modules/node/src/Plugin/Action/AssignOwnerNode.php
index d9a9a4355d..00dfbfc6d3 100644
--- a/core/modules/node/src/Plugin/Action/AssignOwnerNode.php
+++ b/core/modules/node/src/Plugin/Action/AssignOwnerNode.php
@@ -80,7 +80,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
     $count = $this->connection->query("SELECT COUNT(*) FROM {users}")->fetchField();
 
     // Use dropdown for fewer than 200 users; textbox for more than that.
-    if (intval($count) < 200) {
+    if ((int)$count < 200) {
       $options = [];
       $result = $this->connection->query("SELECT uid, name FROM {users_field_data} WHERE uid > 0 AND default_langcode = 1 ORDER BY name");
       foreach ($result as $data) {
diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module
index 54dc56c8f7..ac7491bbad 100644
--- a/core/modules/responsive_image/responsive_image.module
+++ b/core/modules/responsive_image/responsive_image.module
@@ -435,7 +435,7 @@ function _responsive_image_build_source_attributes(array $variables, BreakpointI
           // Use the image width as key so we can sort the array later on.
           // Images within a srcset should be sorted from small to large, since
           // the first matching source will be used.
-          $srcset[intval($dimensions['width'])] = _responsive_image_image_style_url($image_style_name, $variables['uri']) . ' ' . $dimensions['width'] . 'w';
+          $srcset[(int)$dimensions['width']] = _responsive_image_image_style_url($image_style_name, $variables['uri']) . ' ' . $dimensions['width'] . 'w';
           $sizes = array_merge(explode(',', $image_style_mapping['image_mapping']['sizes']), $sizes);
         }
         break;
@@ -449,7 +449,7 @@ function _responsive_image_build_source_attributes(array $variables, BreakpointI
         // be sorted from small to large, since the first matching source will
         // be used. We multiply it by 100 so multipliers with up to two decimals
         // can be used.
-        $srcset[intval(Unicode::substr($multiplier, 0, -1) * 100)] = _responsive_image_image_style_url($image_style_mapping['image_mapping'], $variables['uri']) . ' ' . $multiplier;
+        $srcset[(int)(Unicode::substr($multiplier, 0, -1) * 100)] = _responsive_image_image_style_url($image_style_mapping['image_mapping'], $variables['uri']) . ' ' . $multiplier;
         break;
     }
   }
diff --git a/core/modules/system/src/Controller/TimezoneController.php b/core/modules/system/src/Controller/TimezoneController.php
index 0691132473..f44c8576f9 100644
--- a/core/modules/system/src/Controller/TimezoneController.php
+++ b/core/modules/system/src/Controller/TimezoneController.php
@@ -31,7 +31,7 @@ public function getTimezone($abbreviation = '', $offset = -1, $is_daylight_savin
     // An abbreviation of "0" passed in the callback arguments should be
     // interpreted as the empty string.
     $abbreviation = $abbreviation ? $abbreviation : '';
-    $timezone = timezone_name_from_abbr($abbreviation, intval($offset), $is_daylight_saving_time);
+    $timezone = timezone_name_from_abbr($abbreviation, (int)$offset, $is_daylight_saving_time);
     return new JsonResponse($timezone);
   }
 
diff --git a/core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php b/core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
index 3dc88810d5..529170884f 100644
--- a/core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
+++ b/core/modules/system/src/Plugin/migrate/process/d6/TimeZone.php
@@ -22,7 +22,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
     // Convert the integer value of the offset (which can be either
     // negative or positive) to a timezone name.
     // Note: Daylight saving time is not to be used.
-    $timezone_name = timezone_name_from_abbr('', intval($offset), 0);
+    $timezone_name = timezone_name_from_abbr('', (int)$offset, 0);
     if (!$timezone_name) {
       $timezone_name = 'UTC';
     }
diff --git a/core/modules/user/src/Form/UserMultipleCancelConfirm.php b/core/modules/user/src/Form/UserMultipleCancelConfirm.php
index 985d19918d..82ee5e3d1e 100644
--- a/core/modules/user/src/Form/UserMultipleCancelConfirm.php
+++ b/core/modules/user/src/Form/UserMultipleCancelConfirm.php
@@ -114,7 +114,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       $names[$uid] = $account->label();
       // Prevent user 1 from being canceled.
       if ($uid <= 1) {
-        $root = intval($uid) === 1 ? $account : $root;
+        $root = (int)$uid === 1 ? $account : $root;
         continue;
       }
       $form['accounts'][$uid] = [
diff --git a/core/modules/views/src/Controller/ViewAjaxController.php b/core/modules/views/src/Controller/ViewAjaxController.php
index 4aefdabd8e..67b16a98a6 100644
--- a/core/modules/views/src/Controller/ViewAjaxController.php
+++ b/core/modules/views/src/Controller/ViewAjaxController.php
@@ -126,7 +126,7 @@ public function ajaxView(Request $request) {
       $dom_id = $request->request->get('view_dom_id');
       $dom_id = isset($dom_id) ? preg_replace('/[^a-zA-Z0-9_-]+/', '-', $dom_id) : NULL;
       $pager_element = $request->request->get('pager_element');
-      $pager_element = isset($pager_element) ? intval($pager_element) : NULL;
+      $pager_element = isset($pager_element) ? (int)$pager_element : NULL;
 
       $response = new ViewAjaxResponse();
 
diff --git a/core/modules/views/src/Plugin/views/argument/StringArgument.php b/core/modules/views/src/Plugin/views/argument/StringArgument.php
index 6058d6618b..b13b515c4f 100644
--- a/core/modules/views/src/Plugin/views/argument/StringArgument.php
+++ b/core/modules/views/src/Plugin/views/argument/StringArgument.php
@@ -174,7 +174,7 @@ protected function summaryQuery() {
    * $this->ensureMyTable() MUST have been called prior to this.
    */
   public function getFormula() {
-    $formula = "SUBSTRING($this->tableAlias.$this->realField, 1, " . intval($this->options['limit']) . ")";
+    $formula = "SUBSTRING($this->tableAlias.$this->realField, 1, " . (int)$this->options['limit'] . ")";
 
     if ($this->options['case'] != 'none') {
       // Support case-insensitive substring comparisons for SQLite by using the
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 012dec4f21..8b76ef593f 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -1949,8 +1949,8 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) {
         $this->setOption($section, (bool) $form_state->getValue($section));
         break;
       case 'use_more':
-        $this->setOption($section, intval($form_state->getValue($section)));
-        $this->setOption('use_more_always', intval($form_state->getValue('use_more_always')));
+        $this->setOption($section, (int)$form_state->getValue($section));
+        $this->setOption('use_more_always', (int)$form_state->getValue('use_more_always'));
         $this->setOption('use_more_text', $form_state->getValue('use_more_text'));
         break;
 
diff --git a/core/modules/views/src/Plugin/views/display/PathPluginBase.php b/core/modules/views/src/Plugin/views/display/PathPluginBase.php
index 17d8663ed1..e79cc78fe0 100644
--- a/core/modules/views/src/Plugin/views/display/PathPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/PathPluginBase.php
@@ -365,7 +365,7 @@ public function getMenuLinks() {
         $links[$menu_link_id]['expanded'] = $menu['expanded'];
 
         if (isset($menu['weight'])) {
-          $links[$menu_link_id]['weight'] = intval($menu['weight']);
+          $links[$menu_link_id]['weight'] = (int)$menu['weight'];
         }
 
         // Insert item into the proper menu.
diff --git a/core/modules/views/src/Plugin/views/field/EntityField.php b/core/modules/views/src/Plugin/views/field/EntityField.php
index ee2882c3b5..c8dce3328c 100644
--- a/core/modules/views/src/Plugin/views/field/EntityField.php
+++ b/core/modules/views/src/Plugin/views/field/EntityField.php
@@ -196,7 +196,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
 
       // Otherwise, we only limit values if the user hasn't selected "all", 0, or
       // the value matching field cardinality.
-      if ((($this->options['delta_limit'] > 0) && ($this->options['delta_limit'] != $cardinality)) || intval($this->options['delta_offset'])) {
+      if ((($this->options['delta_limit'] > 0) && ($this->options['delta_limit'] != $cardinality)) || (int)$this->options['delta_offset']) {
         $this->limit_values = TRUE;
       }
     }
@@ -736,7 +736,7 @@ protected function prepareItemsByDelta(array $all_values) {
       }
       else {
         $delta_limit = $this->options['delta_limit'];
-        $offset = intval($this->options['delta_offset']);
+        $offset = (int)$this->options['delta_offset'];
 
         // We should only get here in this case if there is an offset, and in
         // that case we are limiting to all values after the offset.
diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php
index 92e77dff7c..441c07399f 100644
--- a/core/modules/views/src/Plugin/views/filter/Date.php
+++ b/core/modules/views/src/Plugin/views/filter/Date.php
@@ -162,8 +162,8 @@ public function acceptExposedInput($input) {
   }
 
   protected function opBetween($field) {
-    $a = intval(strtotime($this->value['min'], 0));
-    $b = intval(strtotime($this->value['max'], 0));
+    $a = (int)strtotime($this->value['min'], 0);
+    $b = (int)strtotime($this->value['max'], 0);
 
     if ($this->value['type'] == 'offset') {
       // Keep sign.
@@ -178,7 +178,7 @@ protected function opBetween($field) {
   }
 
   protected function opSimple($field) {
-    $value = intval(strtotime($this->value['value'], 0));
+    $value = (int)strtotime($this->value['value'], 0);
     if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
       // Keep sign.
       $value = '***CURRENT_TIME***' . sprintf('%+d', $value);
diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
index 52f4393d15..91b2fcaa71 100644
--- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
+++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
@@ -210,7 +210,7 @@ public function render($input) {}
    */
   public function hasMoreRecords() {
     return $this->getItemsPerPage()
-      && $this->total_items > (intval($this->current_page) + 1) * $this->getItemsPerPage();
+      && $this->total_items > ((int)$this->current_page + 1) * $this->getItemsPerPage();
   }
 
   public function exposedFormAlter(&$form, FormStateInterface $form_state) {}
diff --git a/core/modules/views/src/Plugin/views/pager/SqlBase.php b/core/modules/views/src/Plugin/views/pager/SqlBase.php
index d683202d17..6711f9c701 100644
--- a/core/modules/views/src/Plugin/views/pager/SqlBase.php
+++ b/core/modules/views/src/Plugin/views/pager/SqlBase.php
@@ -178,7 +178,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) {
     $options = explode(',', $exposed_options);
     if (!$error && is_array($options)) {
       foreach ($options as $option) {
-        if (!is_numeric($option) || intval($option) == 0) {
+        if (!is_numeric($option) || (int)$option == 0) {
           $error = TRUE;
         }
       }
@@ -265,11 +265,11 @@ public function setCurrentPage($number = NULL) {
     }
 
     // Don't allow the number to be less than zero.
-    $this->current_page = max(0, intval($pager_page_array[$this->options['id']]));
+    $this->current_page = max(0, (int)$pager_page_array[$this->options['id']]);
   }
 
   public function getPagerTotal() {
-    if ($items_per_page = intval($this->getItemsPerPage())) {
+    if ($items_per_page = (int)$this->getItemsPerPage()) {
       return ceil($this->total_items / $items_per_page);
     }
     else {
@@ -333,7 +333,7 @@ public function exposedFormAlter(&$form, FormStateInterface $form_state) {
       $sanitized_options = [];
       if (is_array($options)) {
         foreach ($options as $option) {
-          $sanitized_options[intval($option)] = intval($option);
+          $sanitized_options[(int)$option] = (int)$option;
         }
         if (!empty($this->options['expose']['items_per_page_options_all']) && !empty($this->options['expose']['items_per_page_options_all_label'])) {
           $sanitized_options['All'] = $this->options['expose']['items_per_page_options_all_label'];
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 2771a3d7c0..f6706c287e 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -1477,8 +1477,8 @@ public function execute(ViewExecutable $view) {
 
         if (!empty($this->limit) || !empty($this->offset)) {
           // We can't have an offset without a limit, so provide a very large limit instead.
-          $limit  = intval(!empty($this->limit) ? $this->limit : 999999);
-          $offset = intval(!empty($this->offset) ? $this->offset : 0);
+          $limit  = (int)(!empty($this->limit) ? $this->limit : 999999);
+          $offset = (int)(!empty($this->offset) ? $this->offset : 0);
           $query->range($offset, $limit);
         }
 
diff --git a/core/modules/views/src/Plugin/views/style/DefaultSummary.php b/core/modules/views/src/Plugin/views/style/DefaultSummary.php
index 0b4325bcc9..2c15ce8041 100644
--- a/core/modules/views/src/Plugin/views/style/DefaultSummary.php
+++ b/core/modules/views/src/Plugin/views/style/DefaultSummary.php
@@ -32,7 +32,7 @@ protected function defineOptions() {
 
   public function query() {
     if (!empty($this->options['override'])) {
-      $this->view->setItemsPerPage(intval($this->options['items_per_page']));
+      $this->view->setItemsPerPage((int)$this->options['items_per_page']);
     }
   }
 
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index a26742b91c..0dd97b0156 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -307,7 +307,7 @@ function template_preprocess_views_view_summary(&$variables) {
       $url = $view->getUrl($args)->setOptions($url_options);
     }
     $variables['rows'][$id]->url = $url->toString();
-    $variables['rows'][$id]->count = intval($row->{$argument->count_alias});
+    $variables['rows'][$id]->count = (int)$row->{$argument->count_alias};
     $variables['rows'][$id]->attributes = new Attribute($variables['rows'][$id]->attributes);
     $variables['rows'][$id]->active = isset($active_urls[$variables['rows'][$id]->url]);
   }
@@ -393,7 +393,7 @@ function template_preprocess_views_view_summary_unformatted(&$variables) {
       $url = $view->getUrl($args)->setOptions($url_options);
     }
     $variables['rows'][$id]->url = $url->toString();
-    $variables['rows'][$id]->count = intval($row->{$argument->count_alias});
+    $variables['rows'][$id]->count = (int)$row->{$argument->count_alias};
     $variables['rows'][$id]->active = isset($active_urls[$variables['rows'][$id]->url]);
     $variables['rows'][$id]->attributes = new Attribute($variables['rows'][$id]->attributes);
   }
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index 2e7fabd62b..aa7969d62d 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -724,7 +724,7 @@ public function renderPreview($display_id, $args = []) {
                   '#template' => "<strong>{% trans 'Query build time' %}</strong>",
                 ],
               ],
-              t('@time ms', ['@time' => intval($executable->build_time * 100000) / 100]),
+              t('@time ms', ['@time' => (int)($executable->build_time * 100000) / 100]),
             ];
 
             $rows['statistics'][] = [
@@ -734,7 +734,7 @@ public function renderPreview($display_id, $args = []) {
                   '#template' => "<strong>{% trans 'Query execute time' %}</strong>",
                 ],
               ],
-              t('@time ms', ['@time' => intval($executable->execute_time * 100000) / 100]),
+              t('@time ms', ['@time' => (int)($executable->execute_time * 100000) / 100]),
             ];
 
             $rows['statistics'][] = [
@@ -744,7 +744,7 @@ public function renderPreview($display_id, $args = []) {
                   '#template' => "<strong>{% trans 'View render time' %}</strong>",
                 ],
               ],
-              t('@time ms', ['@time' => intval($this->render_time * 100) / 100]),
+              t('@time ms', ['@time' => (int)($this->render_time * 100) / 100]),
             ];
           }
           \Drupal::moduleHandler()->alter('views_preview_info', $rows, $executable);
diff --git a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
index 0fefc390f4..f8f46756cf 100644
--- a/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Cache/DatabaseBackendTagTest.php
@@ -43,7 +43,7 @@ public function testTagInvalidations() {
       $this->assertTrue($bin->get('test'), 'Cache item was set in bin.');
     }
 
-    $invalidations_before = intval(db_select('cachetags')->fields('cachetags', ['invalidations'])->condition('tag', 'test_tag:2')->execute()->fetchField());
+    $invalidations_before = (int)db_select('cachetags')->fields('cachetags', ['invalidations'])->condition('tag', 'test_tag:2')->execute()->fetchField();
     Cache::invalidateTags(['test_tag:2']);
 
     // Test that cache entry has been invalidated in multiple bins.
@@ -53,7 +53,7 @@ public function testTagInvalidations() {
     }
 
     // Test that only one tag invalidation has occurred.
-    $invalidations_after = intval(db_select('cachetags')->fields('cachetags', ['invalidations'])->condition('tag', 'test_tag:2')->execute()->fetchField());
+    $invalidations_after = (int)db_select('cachetags')->fields('cachetags', ['invalidations'])->condition('tag', 'test_tag:2')->execute()->fetchField();
     $this->assertEqual($invalidations_after, $invalidations_before + 1, 'Only one addition cache tag invalidation has occurred after invalidating a tag used in multiple bins.');
   }
 
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
index 9edee5cd21..b1cbcfac95 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
@@ -619,7 +619,7 @@ protected function assertResult() {
       $expected = $expected[0];
     }
     foreach ($expected as $binary) {
-      $assert[$binary] = strval($binary);
+      $assert[$binary] = (string)$binary;
     }
     $this->assertIdentical($this->queryResults, $assert);
   }
@@ -627,7 +627,7 @@ protected function assertResult() {
   protected function assertRevisionResult($keys, $expected) {
     $assert = [];
     foreach ($expected as $key => $binary) {
-      $assert[$keys[$key]] = strval($binary);
+      $assert[$keys[$key]] = (string)$binary;
     }
     $this->assertIdentical($this->queryResults, $assert);
     return $assert;
