diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
index 35b1686b51..8eddb2b892 100644
--- a/src/wp-admin/admin-header.php
+++ b/src/wp-admin/admin-header.php
@@ -170,7 +170,7 @@
 	$admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
 }
 
-$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
+$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', (float) get_bloginfo( 'version' ) );
 $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
 $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php
index 39f28a6237..d1c9b6e1b2 100644
--- a/src/wp-admin/async-upload.php
+++ b/src/wp-admin/async-upload.php
@@ -39,8 +39,8 @@
 }
 
 // Just fetch the detail form for that attachment.
-if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
-	$id   = intval( $_REQUEST['attachment_id'] );
+if ( isset( $_REQUEST['attachment_id'] ) && (int) $_REQUEST['attachment_id'] && $_REQUEST['fetch'] ) {
+	$id   = (int) $_REQUEST['attachment_id'];
 	$post = get_post( $id );
 	if ( 'attachment' !== $post->post_type ) {
 		wp_die( __( 'Invalid post type.' ) );
diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php
index 2ced05ab2d..c2a16eef0b 100644
--- a/src/wp-admin/edit-comments.php
+++ b/src/wp-admin/edit-comments.php
@@ -329,7 +329,7 @@
 <?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>
 
 <?php if ( $post_id ) : ?>
-<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
+<input type="hidden" name="p" value="<?php echo esc_attr( (int) $post_id ); ?>" />
 <?php endif; ?>
 <input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" />
 <input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', 1 ) ); ?>" />
diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
index 09fa49cb94..7c2ba995a6 100644
--- a/src/wp-admin/includes/ajax-actions.php
+++ b/src/wp-admin/includes/ajax-actions.php
@@ -227,7 +227,7 @@ function wp_ajax_wp_compression_test() {
  * @since 3.1.0
  */
 function wp_ajax_imgedit_preview() {
-	$post_id = intval( $_GET['postid'] );
+	$post_id = (int) $_GET['postid'];
 	if ( empty( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) {
 		wp_die( -1 );
 	}
@@ -1954,7 +1954,7 @@ function wp_ajax_menu_quick_search() {
  */
 function wp_ajax_get_permalink() {
 	check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
-	$post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
+	$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
 	wp_die( get_preview_post_link( $post_id ) );
 }
 
@@ -1965,7 +1965,7 @@ function wp_ajax_get_permalink() {
  */
 function wp_ajax_sample_permalink() {
 	check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
-	$post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
+	$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
 	$title   = isset( $_POST['new_title'] ) ? $_POST['new_title'] : '';
 	$slug    = isset( $_POST['new_slug'] ) ? $_POST['new_slug'] : null;
 	wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
@@ -2594,7 +2594,7 @@ function wp_ajax_upload_attachment() {
  * @since 3.1.0
  */
 function wp_ajax_image_editor() {
-	$attachment_id = intval( $_POST['postid'] );
+	$attachment_id = (int) $_POST['postid'];
 
 	if ( empty( $attachment_id ) || ! current_user_can( 'edit_post', $attachment_id ) ) {
 		wp_die( -1 );
@@ -2651,12 +2651,12 @@ function wp_ajax_image_editor() {
 function wp_ajax_set_post_thumbnail() {
 	$json = ! empty( $_REQUEST['json'] ); // New-style request.
 
-	$post_ID = intval( $_POST['post_id'] );
+	$post_ID = (int) $_POST['post_id'];
 	if ( ! current_user_can( 'edit_post', $post_ID ) ) {
 		wp_die( -1 );
 	}
 
-	$thumbnail_id = intval( $_POST['thumbnail_id'] );
+	$thumbnail_id = (int) $_POST['thumbnail_id'];
 
 	if ( $json ) {
 		check_ajax_referer( "update-post_$post_ID" );
@@ -2687,7 +2687,7 @@ function wp_ajax_set_post_thumbnail() {
  * @since 4.6.0
  */
 function wp_ajax_get_post_thumbnail_html() {
-	$post_ID = intval( $_POST['post_id'] );
+	$post_ID = (int) $_POST['post_id'];
 
 	check_ajax_referer( "update-post_$post_ID" );
 
@@ -2695,7 +2695,7 @@ function wp_ajax_get_post_thumbnail_html() {
 		wp_die( -1 );
 	}
 
-	$thumbnail_id = intval( $_POST['thumbnail_id'] );
+	$thumbnail_id = (int) $_POST['thumbnail_id'];
 
 	// For backward compatibility, -1 refers to no featured image.
 	if ( -1 === $thumbnail_id ) {
@@ -3208,7 +3208,7 @@ function wp_ajax_send_attachment_to_editor() {
 
 	$attachment = wp_unslash( $_POST['attachment'] );
 
-	$id = intval( $attachment['id'] );
+	$id = (int) $attachment['id'];
 
 	$post = get_post( $id );
 	if ( ! $post ) {
@@ -3221,7 +3221,7 @@ function wp_ajax_send_attachment_to_editor() {
 
 	if ( current_user_can( 'edit_post', $id ) ) {
 		// If this attachment is unattached, attach it. Primarily a back compat thing.
-		$insert_into_post_id = intval( $_POST['post_id'] );
+		$insert_into_post_id = (int) $_POST['post_id'];
 
 		if ( 0 == $post->post_parent && $insert_into_post_id ) {
 			wp_update_post(
@@ -3622,7 +3622,7 @@ function wp_ajax_parse_embed() {
 		wp_send_json_error();
 	}
 
-	$post_id = isset( $_POST['post_ID'] ) ? intval( $_POST['post_ID'] ) : 0;
+	$post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0;
 
 	if ( $post_id > 0 ) {
 		$post = get_post( $post_id );
@@ -3674,9 +3674,9 @@ function wp_ajax_parse_embed() {
 	// Set $content_width so any embeds fit in the destination iframe.
 	if ( isset( $_POST['maxwidth'] ) && is_numeric( $_POST['maxwidth'] ) && $_POST['maxwidth'] > 0 ) {
 		if ( ! isset( $content_width ) ) {
-			$content_width = intval( $_POST['maxwidth'] );
+			$content_width = (int) $_POST['maxwidth'];
 		} else {
-			$content_width = min( $content_width, intval( $_POST['maxwidth'] ) );
+			$content_width = min( $content_width, (int) $_POST['maxwidth'] );
 		}
 	}
 
diff --git a/src/wp-admin/includes/class-walker-nav-menu-checklist.php b/src/wp-admin/includes/class-walker-nav-menu-checklist.php
index 11e78dd529..3f4d6c1574 100644
--- a/src/wp-admin/includes/class-walker-nav-menu-checklist.php
+++ b/src/wp-admin/includes/class-walker-nav-menu-checklist.php
@@ -74,7 +74,7 @@ public function end_lvl( &$output, $depth = 0, $args = null ) {
 	public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
 		global $_nav_menu_placeholder, $nav_menu_selected_id;
 
-		$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
+		$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? (int) $_nav_menu_placeholder - 1 : -1;
 		$possible_object_id    = isset( $item->post_type ) && 'nav_menu_item' === $item->post_type ? $item->object_id : $_nav_menu_placeholder;
 		$possible_db_id        = ( ! empty( $item->ID ) ) && ( 0 < $possible_object_id ) ? (int) $item->ID : 0;
 
diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php
index e677074a94..b60c783c90 100644
--- a/src/wp-admin/includes/class-wp-importer.php
+++ b/src/wp-admin/includes/class-wp-importer.php
@@ -37,7 +37,7 @@ public function get_imported_posts( $importer_name, $bid ) {
 			if ( ! empty( $results ) ) {
 				foreach ( $results as $r ) {
 					// Set permalinks into array.
-					$hashtable[ $r->meta_value ] = intval( $r->post_id );
+					$hashtable[ $r->meta_value ] = (int) $r->post_id;
 				}
 			}
 		} while ( count( $results ) == $limit );
@@ -69,7 +69,7 @@ public function count_imported_posts( $importer_name, $bid ) {
 		$result = $wpdb->get_results( $sql );
 
 		if ( ! empty( $result ) ) {
-			$count = intval( $result[0]->cnt );
+			$count = (int) $result[0]->cnt;
 		}
 
 		// Unset to save memory.
@@ -106,11 +106,11 @@ public function get_imported_comments( $bid ) {
 				foreach ( $results as $r ) {
 					// Explode comment_agent key.
 					list ( $ca_bid, $source_comment_id ) = explode( '-', $r->comment_agent );
-					$source_comment_id                   = intval( $source_comment_id );
+					$source_comment_id                   = (int) $source_comment_id;
 
 					// Check if this comment came from this blog.
 					if ( $bid == $ca_bid ) {
-						$hashtable[ $source_comment_id ] = intval( $r->comment_ID );
+						$hashtable[ $source_comment_id ] = (int) $r->comment_ID;
 					}
 				}
 			}
diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 7f72767693..0a05b8e19e 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -816,7 +816,7 @@ protected function get_items_per_page( $option, $default = 20 ) {
 		 *
 		 * @param int $per_page Number of items to be displayed. Default 20.
 		 */
-		return (int) apply_filters( "{$option}", $per_page );
+		return (int) apply_filters( (string) ( $option ), $per_page );
 	}
 
 	/**
diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php
index e1d15d6337..846ad07489 100644
--- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php
+++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php
@@ -103,8 +103,8 @@ public function prepare_items() {
 		}
 
 		$args = array(
-			'number'     => intval( $per_page ),
-			'offset'     => intval( ( $pagenum - 1 ) * $per_page ),
+			'number'     => (int) $per_page,
+			'offset'     => (int) ( ( $pagenum - 1 ) * $per_page ),
 			'network_id' => get_current_network_id(),
 		);
 
@@ -620,7 +620,7 @@ protected function site_states( $site ) {
 
 		$site_status = isset( $_REQUEST['status'] ) ? wp_unslash( trim( $_REQUEST['status'] ) ) : '';
 		foreach ( $this->status_list as $status => $col ) {
-			if ( ( 1 === intval( $_site->{$status} ) ) && ( $site_status !== $status ) ) {
+			if ( ( 1 === (int) $_site->{$status} ) && ( $site_status !== $status ) ) {
 				$site_states[ $col[0] ] = $col[1];
 			}
 		}
diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
index de1b741234..113fad5c43 100644
--- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php
+++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
@@ -63,7 +63,7 @@ public function __construct( $args = array() ) {
 		$this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false;
 
 		if ( $this->is_site_themes ) {
-			$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+			$this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 		}
 
 		$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'theme' ) &&
diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
index a7d4748840..9203a23688 100644
--- a/src/wp-admin/includes/class-wp-posts-list-table.php
+++ b/src/wp-admin/includes/class-wp-posts-list-table.php
@@ -89,19 +89,17 @@ public function __construct( $args = array() ) {
 				'show_in_admin_all_list' => false,
 			)
 		);
-		$this->user_posts_count = intval(
-			$wpdb->get_var(
-				$wpdb->prepare(
-					"
+		$this->user_posts_count = (int) $wpdb->get_var(
+			$wpdb->prepare(
+				"
 			SELECT COUNT( 1 )
 			FROM $wpdb->posts
 			WHERE post_type = %s
 			AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' )
 			AND post_author = %d
 		",
-					$post_type,
-					get_current_user_id()
-				)
+				$post_type,
+				get_current_user_id()
 			)
 		);
 
diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php
index 440527f249..a4d9966c74 100644
--- a/src/wp-admin/includes/class-wp-screen.php
+++ b/src/wp-admin/includes/class-wp-screen.php
@@ -1254,7 +1254,7 @@ public function render_per_page_options() {
 			$per_page = apply_filters( 'edit_categories_per_page', $per_page );
 		} else {
 			/** This filter is documented in wp-admin/includes/class-wp-list-table.php */
-			$per_page = apply_filters( "{$option}", $per_page );
+			$per_page = apply_filters( (string) ( $option ), $per_page );
 		}
 
 		// Back compat.
diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php
index 018654bdd2..ae52238844 100644
--- a/src/wp-admin/includes/class-wp-users-list-table.php
+++ b/src/wp-admin/includes/class-wp-users-list-table.php
@@ -54,7 +54,7 @@ public function __construct( $args = array() ) {
 		$this->is_site_users = 'site-users-network' === $this->screen->id;
 
 		if ( $this->is_site_users ) {
-			$this->site_id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+			$this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 		}
 	}
 
diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php
index 6b49163092..12a069eef6 100644
--- a/src/wp-admin/includes/dashboard.php
+++ b/src/wp-admin/includes/dashboard.php
@@ -606,7 +606,7 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
 	echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n<ul>";
 
 	/* translators: Maximum number of words used in a preview of a draft on the dashboard. */
-	$draft_length = intval( _x( '10', 'draft_length' ) );
+	$draft_length = (int) _x( '10', 'draft_length' );
 
 	$drafts = array_slice( $drafts, 0, 3 );
 	foreach ( $drafts as $draft ) {
@@ -928,7 +928,7 @@ function wp_dashboard_recent_posts( $args ) {
 		'post_status'    => $args['status'],
 		'orderby'        => 'date',
 		'order'          => $args['order'],
-		'posts_per_page' => intval( $args['max'] ),
+		'posts_per_page' => (int) $args['max'],
 		'no_found_rows'  => true,
 		'cache_results'  => false,
 		'perm'           => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php
index 7b1b797eb4..92d84baa46 100644
--- a/src/wp-admin/includes/export.php
+++ b/src/wp-admin/includes/export.php
@@ -372,7 +372,7 @@ function wxr_authors_list( array $post_ids = null ) {
 
 		foreach ( $authors as $author ) {
 			echo "\t<wp:author>";
-			echo '<wp:author_id>' . intval( $author->ID ) . '</wp:author_id>';
+			echo '<wp:author_id>' . (int) $author->ID . '</wp:author_id>';
 			echo '<wp:author_login>' . wxr_cdata( $author->user_login ) . '</wp:author_login>';
 			echo '<wp:author_email>' . wxr_cdata( $author->user_email ) . '</wp:author_email>';
 			echo '<wp:author_display_name>' . wxr_cdata( $author->display_name ) . '</wp:author_display_name>';
@@ -395,7 +395,7 @@ function wxr_nav_menu_terms() {
 
 		foreach ( $nav_menus as $menu ) {
 			echo "\t<wp:term>";
-			echo '<wp:term_id>' . intval( $menu->term_id ) . '</wp:term_id>';
+			echo '<wp:term_id>' . (int) $menu->term_id . '</wp:term_id>';
 			echo '<wp:term_taxonomy>nav_menu</wp:term_taxonomy>';
 			echo '<wp:term_slug>' . wxr_cdata( $menu->slug ) . '</wp:term_slug>';
 			wxr_term_name( $menu );
@@ -478,7 +478,7 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 
 	<?php foreach ( $cats as $c ) : ?>
 	<wp:category>
-		<wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
+		<wp:term_id><?php echo (int) $c->term_id; ?></wp:term_id>
 		<wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
 		<wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[ $c->parent ]->slug : '' ); ?></wp:category_parent>
 		<?php
@@ -490,7 +490,7 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 	<?php endforeach; ?>
 	<?php foreach ( $tags as $t ) : ?>
 	<wp:tag>
-		<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
+		<wp:term_id><?php echo (int) $t->term_id; ?></wp:term_id>
 		<wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug>
 		<?php
 		wxr_tag_name( $t );
@@ -501,7 +501,7 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 	<?php endforeach; ?>
 	<?php foreach ( $terms as $t ) : ?>
 	<wp:term>
-		<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
+		<wp:term_id><?php echo (int) $t->term_id; ?></wp:term_id>
 		<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
 		<wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
 		<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[ $t->parent ]->slug : '' ); ?></wp:term_parent>
@@ -573,18 +573,18 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 		<description></description>
 		<content:encoded><?php echo $content; ?></content:encoded>
 		<excerpt:encoded><?php echo $excerpt; ?></excerpt:encoded>
-		<wp:post_id><?php echo intval( $post->ID ); ?></wp:post_id>
+		<wp:post_id><?php echo (int) $post->ID; ?></wp:post_id>
 		<wp:post_date><?php echo wxr_cdata( $post->post_date ); ?></wp:post_date>
 		<wp:post_date_gmt><?php echo wxr_cdata( $post->post_date_gmt ); ?></wp:post_date_gmt>
 		<wp:comment_status><?php echo wxr_cdata( $post->comment_status ); ?></wp:comment_status>
 		<wp:ping_status><?php echo wxr_cdata( $post->ping_status ); ?></wp:ping_status>
 		<wp:post_name><?php echo wxr_cdata( $post->post_name ); ?></wp:post_name>
 		<wp:status><?php echo wxr_cdata( $post->post_status ); ?></wp:status>
-		<wp:post_parent><?php echo intval( $post->post_parent ); ?></wp:post_parent>
-		<wp:menu_order><?php echo intval( $post->menu_order ); ?></wp:menu_order>
+		<wp:post_parent><?php echo (int) $post->post_parent; ?></wp:post_parent>
+		<wp:menu_order><?php echo (int) $post->menu_order; ?></wp:menu_order>
 		<wp:post_type><?php echo wxr_cdata( $post->post_type ); ?></wp:post_type>
 		<wp:post_password><?php echo wxr_cdata( $post->post_password ); ?></wp:post_password>
-		<wp:is_sticky><?php echo intval( $is_sticky ); ?></wp:is_sticky>
+		<wp:is_sticky><?php echo (int) $is_sticky; ?></wp:is_sticky>
 				<?php	if ( 'attachment' === $post->post_type ) : ?>
 		<wp:attachment_url><?php echo wxr_cdata( wp_get_attachment_url( $post->ID ) ); ?></wp:attachment_url>
 	<?php endif; ?>
@@ -620,7 +620,7 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 				foreach ( $comments as $c ) :
 					?>
 		<wp:comment>
-			<wp:comment_id><?php echo intval( $c->comment_ID ); ?></wp:comment_id>
+			<wp:comment_id><?php echo (int) $c->comment_ID; ?></wp:comment_id>
 			<wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author>
 			<wp:comment_author_email><?php echo wxr_cdata( $c->comment_author_email ); ?></wp:comment_author_email>
 			<wp:comment_author_url><?php echo esc_url_raw( $c->comment_author_url ); ?></wp:comment_author_url>
@@ -630,8 +630,8 @@ function wxr_filter_postmeta( $return_me, $meta_key ) {
 			<wp:comment_content><?php echo wxr_cdata( $c->comment_content ); ?></wp:comment_content>
 			<wp:comment_approved><?php echo wxr_cdata( $c->comment_approved ); ?></wp:comment_approved>
 			<wp:comment_type><?php echo wxr_cdata( $c->comment_type ); ?></wp:comment_type>
-			<wp:comment_parent><?php echo intval( $c->comment_parent ); ?></wp:comment_parent>
-			<wp:comment_user_id><?php echo intval( $c->user_id ); ?></wp:comment_user_id>
+			<wp:comment_parent><?php echo (int) $c->comment_parent; ?></wp:comment_parent>
+			<wp:comment_user_id><?php echo (int) $c->user_id; ?></wp:comment_user_id>
 					<?php
 					$c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
 					foreach ( $c_meta as $meta ) :
diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 0625bec9e2..88ac0cae2f 100644
--- a/src/wp-admin/includes/file.php
+++ b/src/wp-admin/includes/file.php
@@ -510,7 +510,7 @@ function wp_edit_theme_plugin_file( $args ) {
 
 		$scrape_key   = md5( rand() );
 		$transient    = 'scrape_key_' . $scrape_key;
-		$scrape_nonce = strval( rand() );
+		$scrape_nonce = (string) rand();
 		// It shouldn't take more than 60 seconds to make the two loopback requests.
 		set_transient( $transient, $scrape_nonce, 60 );
 
diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php
index c3bd58613c..0d23c18318 100644
--- a/src/wp-admin/includes/image-edit.php
+++ b/src/wp-admin/includes/image-edit.php
@@ -786,8 +786,8 @@ function wp_save_image( $post_id ) {
 		return $return;
 	}
 
-	$fwidth  = ! empty( $_REQUEST['fwidth'] ) ? intval( $_REQUEST['fwidth'] ) : 0;
-	$fheight = ! empty( $_REQUEST['fheight'] ) ? intval( $_REQUEST['fheight'] ) : 0;
+	$fwidth  = ! empty( $_REQUEST['fwidth'] ) ? (int) $_REQUEST['fwidth'] : 0;
+	$fheight = ! empty( $_REQUEST['fheight'] ) ? (int) $_REQUEST['fheight'] : 0;
 	$target  = ! empty( $_REQUEST['target'] ) ? preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['target'] ) : '';
 	$scale   = ! empty( $_REQUEST['do'] ) && 'scale' === $_REQUEST['do'];
 
@@ -944,8 +944,8 @@ function wp_save_image( $post_id ) {
 			}
 
 			if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
-				$width  = intval( $_wp_additional_image_sizes[ $size ]['width'] );
-				$height = intval( $_wp_additional_image_sizes[ $size ]['height'] );
+				$width  = (int) $_wp_additional_image_sizes[ $size ]['width'];
+				$height = (int) $_wp_additional_image_sizes[ $size ]['height'];
 				$crop   = ( $nocrop ) ? false : $_wp_additional_image_sizes[ $size ]['crop'];
 			} else {
 				$height = get_option( "{$size}_size_h" );
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index d206aa163c..490d603f31 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -49,10 +49,10 @@ function update_gallery_tab( $tabs ) {
 		return $tabs;
 	}
 
-	$post_id = intval( $_REQUEST['post_id'] );
+	$post_id = (int) $_REQUEST['post_id'];
 
 	if ( $post_id ) {
-		$attachments = intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) ) );
+		$attachments = (int) $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) );
 	}
 
 	if ( empty( $attachments ) ) {
@@ -138,7 +138,7 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
 		if ( is_string( $rel ) ) {
 			$rel = ' rel="' . esc_attr( $rel ) . '"';
 		} else {
-			$rel = ' rel="attachment wp-att-' . intval( $id ) . '"';
+			$rel = ' rel="attachment wp-att-' . (int) $id . '"';
 		}
 	} else {
 		$rel = '';
@@ -1549,7 +1549,7 @@ function get_media_item( $attachment_id, $args = null ) {
 	global $redir_tab;
 
 	$thumb_url     = false;
-	$attachment_id = intval( $attachment_id );
+	$attachment_id = (int) $attachment_id;
 
 	if ( $attachment_id ) {
 		$thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true );
@@ -2035,7 +2035,7 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
  * @since 2.5.0
  */
 function media_upload_header() {
-	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
 
 	echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>';
 
@@ -2071,7 +2071,7 @@ function media_upload_form( $errors = null ) {
 	}
 
 	$upload_action_url = admin_url( 'async-upload.php' );
-	$post_id           = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$post_id           = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
 	$_type             = isset( $type ) ? $type : '';
 	$_tab              = isset( $tab ) ? $tab : '';
 
@@ -2281,7 +2281,7 @@ function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
 
 	media_upload_header();
 
-	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
 
 	$form_action_url = admin_url( "media-upload.php?type=$type&tab=type&post_id=$post_id" );
 
@@ -2358,7 +2358,7 @@ function media_upload_type_url_form( $type = null, $errors = null, $id = null )
 
 	media_upload_header();
 
-	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
 
 	$form_action_url = admin_url( "media-upload.php?type=$type&tab=type&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
@@ -2506,7 +2506,7 @@ function media_upload_gallery_form( $errors ) {
 	$redir_tab = 'gallery';
 	media_upload_header();
 
-	$post_id         = intval( $_REQUEST['post_id'] );
+	$post_id         = (int) $_REQUEST['post_id'];
 	$form_action_url = admin_url( "media-upload.php?type=$type&tab=gallery&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
 	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
@@ -2669,7 +2669,7 @@ function media_upload_library_form( $errors ) {
 
 	media_upload_header();
 
-	$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
+	$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
 
 	$form_action_url = admin_url( "media-upload.php?type=$type&tab=library&post_id=$post_id" );
 	/** This filter is documented in wp-admin/includes/media.php */
@@ -2682,7 +2682,7 @@ function media_upload_library_form( $errors ) {
 
 	$q                   = $_GET;
 	$q['posts_per_page'] = 10;
-	$q['paged']          = isset( $q['paged'] ) ? intval( $q['paged'] ) : 0;
+	$q['paged']          = isset( $q['paged'] ) ? (int) $q['paged'] : 0;
 	if ( $q['paged'] < 1 ) {
 		$q['paged'] = 1;
 	}
@@ -2984,9 +2984,9 @@ function media_upload_flash_bypass() {
 
 	$post = get_post();
 	if ( $post ) {
-		$browser_uploader .= '&amp;post_id=' . intval( $post->ID );
+		$browser_uploader .= '&amp;post_id=' . (int) $post->ID;
 	} elseif ( ! empty( $GLOBALS['post_ID'] ) ) {
-		$browser_uploader .= '&amp;post_id=' . intval( $GLOBALS['post_ID'] );
+		$browser_uploader .= '&amp;post_id=' . (int) $GLOBALS['post_ID'];
 	}
 
 	?>
@@ -3078,7 +3078,7 @@ function edit_form_image_editor( $post ) {
 	}
 
 	$thumb_url     = false;
-	$attachment_id = intval( $post->ID );
+	$attachment_id = (int) $post->ID;
 
 	if ( $attachment_id ) {
 		$thumb_url = wp_get_attachment_image_src( $attachment_id, array( 900, 450 ), true );
diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
index 42d3607d23..90ab82ce5f 100644
--- a/src/wp-admin/includes/nav-menu.php
+++ b/src/wp-admin/includes/nav-menu.php
@@ -382,7 +382,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
 			$important_pages[]   = $front_page_obj;
 			$suppress_page_ids[] = $front_page_obj->ID;
 		} else {
-			$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
+			$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? (int) $_nav_menu_placeholder - 1 : -1;
 			$front_page_obj        = (object) array(
 				'front_or_home' => true,
 				'ID'            => 0,
@@ -609,7 +609,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
 				$args['walker'] = $walker;
 
 				if ( $post_type->has_archive ) {
-					$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
+					$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? (int) $_nav_menu_placeholder - 1 : -1;
 					array_unshift(
 						$posts,
 						(object) array(
diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index e201d90da6..263fc98cce 100644
--- a/src/wp-admin/includes/plugin.php
+++ b/src/wp-admin/includes/plugin.php
@@ -1347,9 +1347,9 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
 
 	if ( null === $position ) {
 		$menu[] = $new_menu;
-	} elseif ( isset( $menu[ "$position" ] ) ) {
-		$position            = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
-		$menu[ "$position" ] = $new_menu;
+	} elseif ( isset( $menu[ (string) $position ] ) ) {
+		$position                   = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
+		$menu[ (string) $position ] = $new_menu;
 	} else {
 		$menu[ $position ] = $new_menu;
 	}
diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
index 398add09ea..a0893fb2d2 100644
--- a/src/wp-admin/includes/post.php
+++ b/src/wp-admin/includes/post.php
@@ -1926,7 +1926,7 @@ function post_preview() {
 		}
 
 		if ( isset( $_POST['_thumbnail_id'] ) ) {
-			$query_args['_thumbnail_id'] = ( intval( $_POST['_thumbnail_id'] ) <= 0 ) ? '-1' : intval( $_POST['_thumbnail_id'] );
+			$query_args['_thumbnail_id'] = ( (int) $_POST['_thumbnail_id'] <= 0 ) ? '-1' : (int) $_POST['_thumbnail_id'];
 		}
 	}
 
@@ -2088,7 +2088,7 @@ function taxonomy_meta_box_sanitize_cb_input( $taxonomy, $terms ) {
 		);
 
 		if ( ! empty( $_term ) ) {
-			$clean_terms[] = intval( $_term[0] );
+			$clean_terms[] = (int) $_term[0];
 		} else {
 			// No existing term was found, so pass the string. A new term will be created.
 			$clean_terms[] = $term;
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index e759042627..d9d87da2f4 100644
--- a/src/wp-admin/includes/template.php
+++ b/src/wp-admin/includes/template.php
@@ -1321,7 +1321,7 @@ function do_meta_boxes( $screen, $context, $object ) {
 						echo '<span aria-hidden="true" class="dashicons dashicons-warning"></span>';
 						echo '<span class="screen-reader-text">' . __( 'Warning:' ) . ' </span>';
 					}
-					echo "{$box['title']}";
+					echo (string) ( $box['title'] );
 					echo "</h2>\n";
 
 					if ( 'dashboard_browser_nag' !== $box['id'] ) {
@@ -2205,16 +2205,16 @@ function get_post_states( $post ) {
 	}
 
 	if ( 'page' === get_option( 'show_on_front' ) ) {
-		if ( intval( get_option( 'page_on_front' ) ) === $post->ID ) {
+		if ( (int) get_option( 'page_on_front' ) === $post->ID ) {
 			$post_states['page_on_front'] = _x( 'Front Page', 'page label' );
 		}
 
-		if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
+		if ( (int) get_option( 'page_for_posts' ) === $post->ID ) {
 			$post_states['page_for_posts'] = _x( 'Posts Page', 'page label' );
 		}
 	}
 
-	if ( intval( get_option( 'wp_page_for_privacy_policy' ) ) === $post->ID ) {
+	if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) {
 		$post_states['page_for_privacy_policy'] = _x( 'Privacy Policy Page', 'page label' );
 	}
 
diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php
index e7ebabb8f7..8bc61fd0b3 100644
--- a/src/wp-admin/includes/update.php
+++ b/src/wp-admin/includes/update.php
@@ -1059,7 +1059,7 @@ function wp_get_auto_update_message() {
 	if ( false === $next_update_time ) {
 		$message = __( 'Automatic update not scheduled. There may be a problem with WP-Cron.' );
 	} else {
-		$time_to_next_update = human_time_diff( intval( $next_update_time ) );
+		$time_to_next_update = human_time_diff( (int) $next_update_time );
 
 		// See if cron is overdue.
 		$overdue = ( time() - $next_update_time ) > 0;
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index e0170f2705..ee9b3cdd25 100644
--- a/src/wp-admin/includes/upgrade.php
+++ b/src/wp-admin/includes/upgrade.php
@@ -988,8 +988,8 @@ function upgrade_110() {
 	if ( ! $got_gmt_fields ) {
 
 		// Add or subtract time to all dates, to get GMT dates.
-		$add_hours   = intval( $diff_gmt_weblogger );
-		$add_minutes = intval( 60 * ( $diff_gmt_weblogger - $add_hours ) );
+		$add_hours   = (int) $diff_gmt_weblogger;
+		$add_minutes = (int) ( 60 * ( $diff_gmt_weblogger - $add_hours ) );
 		$wpdb->query( "UPDATE $wpdb->posts SET post_date_gmt = DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)" );
 		$wpdb->query( "UPDATE $wpdb->posts SET post_modified = post_date" );
 		$wpdb->query( "UPDATE $wpdb->posts SET post_modified_gmt = DATE_ADD(post_modified, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE) WHERE post_modified != '0000-00-00 00:00:00'" );
@@ -2014,7 +2014,7 @@ function upgrade_430_fix_comments() {
 		return;
 	}
 
-	$allowed_length = intval( $content_length['length'] ) - 10;
+	$allowed_length = (int) $content_length['length'] - 10;
 
 	$comments = $wpdb->get_results(
 		"SELECT `comment_ID` FROM `{$wpdb->comments}`
diff --git a/src/wp-admin/media-upload.php b/src/wp-admin/media-upload.php
index 64c524ec66..4099cde84c 100644
--- a/src/wp-admin/media-upload.php
+++ b/src/wp-admin/media-upload.php
@@ -51,7 +51,7 @@
 
 // Upload type: image, video, file, ...?
 if ( isset( $_GET['type'] ) ) {
-	$type = strval( $_GET['type'] );
+	$type = (string) $_GET['type'];
 } else {
 	/**
 	 * Filters the default media upload type in the legacy (pre-3.5.0) media popup.
@@ -66,7 +66,7 @@
 
 // Tab: gallery, library, or type-specific.
 if ( isset( $_GET['tab'] ) ) {
-	$tab = strval( $_GET['tab'] );
+	$tab = (string) $_GET['tab'];
 } else {
 	/**
 	 * Filters the default tab in the legacy (pre-3.5.0) media popup.
diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
index a4ef4d5c36..0715c854b5 100644
--- a/src/wp-admin/nav-menus.php
+++ b/src/wp-admin/nav-menus.php
@@ -424,7 +424,7 @@
 
 				// If the menu ID changed, redirect to the new URL.
 				if ( $nav_menu_selected_id !== $_nav_menu_selected_id ) {
-					wp_redirect( admin_url( 'nav-menus.php?menu=' . intval( $_nav_menu_selected_id ) ) );
+					wp_redirect( admin_url( 'nav-menus.php?menu=' . (int) $_nav_menu_selected_id ) );
 					exit;
 				}
 			}
diff --git a/src/wp-admin/network/site-info.php b/src/wp-admin/network/site-info.php
index dddb0bb962..a8294c1e49 100644
--- a/src/wp-admin/network/site-info.php
+++ b/src/wp-admin/network/site-info.php
@@ -17,7 +17,7 @@
 get_current_screen()->add_help_tab( get_site_screen_help_tab_args() );
 get_current_screen()->set_help_sidebar( get_site_screen_help_sidebar_content() );
 
-$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 
 if ( ! $id ) {
 	wp_die( __( 'Invalid site ID.' ) );
diff --git a/src/wp-admin/network/site-settings.php b/src/wp-admin/network/site-settings.php
index 44c417f0d9..ca1ed3fbd6 100644
--- a/src/wp-admin/network/site-settings.php
+++ b/src/wp-admin/network/site-settings.php
@@ -17,7 +17,7 @@
 get_current_screen()->add_help_tab( get_site_screen_help_tab_args() );
 get_current_screen()->set_help_sidebar( get_site_screen_help_sidebar_content() );
 
-$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 
 if ( ! $id ) {
 	wp_die( __( 'Invalid site ID.' ) );
diff --git a/src/wp-admin/network/site-themes.php b/src/wp-admin/network/site-themes.php
index 9e1d136980..14807b54f5 100644
--- a/src/wp-admin/network/site-themes.php
+++ b/src/wp-admin/network/site-themes.php
@@ -40,7 +40,7 @@
 	$referer = add_query_arg( 'paged', (int) $_REQUEST['paged'], $referer );
 }
 
-$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 
 if ( ! $id ) {
 	wp_die( __( 'Invalid site ID.' ) );
diff --git a/src/wp-admin/network/site-users.php b/src/wp-admin/network/site-users.php
index 23c748eeed..319051f89d 100644
--- a/src/wp-admin/network/site-users.php
+++ b/src/wp-admin/network/site-users.php
@@ -35,7 +35,7 @@
 	$referer = add_query_arg( 'paged', (int) $_REQUEST['paged'], $referer );
 }
 
-$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 
 if ( ! $id ) {
 	wp_die( __( 'Invalid site ID.' ) );
diff --git a/src/wp-admin/network/sites.php b/src/wp-admin/network/sites.php
index 16873452d2..5b081c2833 100644
--- a/src/wp-admin/network/sites.php
+++ b/src/wp-admin/network/sites.php
@@ -53,7 +53,7 @@
 	)
 );
 
-$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
+$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
 
 if ( isset( $_GET['action'] ) ) {
 	/** This action is documented in wp-admin/network/edit.php */
diff --git a/src/wp-admin/network/upgrade.php b/src/wp-admin/network/upgrade.php
index 98e3a8b41f..8b0194e6ce 100644
--- a/src/wp-admin/network/upgrade.php
+++ b/src/wp-admin/network/upgrade.php
@@ -45,7 +45,7 @@
 
 switch ( $action ) {
 	case 'upgrade':
-		$n = ( isset( $_GET['n'] ) ) ? intval( $_GET['n'] ) : 0;
+		$n = ( isset( $_GET['n'] ) ) ? (int) $_GET['n'] : 0;
 
 		if ( $n < 5 ) {
 			/**
diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php
index c2e6ee5d6b..4b103fc0bc 100644
--- a/src/wp-admin/network/users.php
+++ b/src/wp-admin/network/users.php
@@ -26,7 +26,7 @@
 
 			check_admin_referer( 'deleteuser' );
 
-			$id = intval( $_GET['id'] );
+			$id = (int) $_GET['id'];
 			if ( $id > 1 ) {
 				$_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays.
 				$title             = __( 'Users' );
diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
index 2319253104..af213dc5b8 100644
--- a/src/wp-admin/users.php
+++ b/src/wp-admin/users.php
@@ -230,7 +230,7 @@
 		}
 
 		if ( empty( $_REQUEST['users'] ) ) {
-			$userids = array( intval( $_REQUEST['user'] ) );
+			$userids = array( (int) $_REQUEST['user'] );
 		} else {
 			$userids = array_map( 'intval', (array) $_REQUEST['users'] );
 		}
@@ -401,7 +401,7 @@
 		}
 
 		if ( empty( $_REQUEST['users'] ) ) {
-			$userids = array( intval( $_REQUEST['user'] ) );
+			$userids = array( (int) $_REQUEST['user'] );
 		} else {
 			$userids = $_REQUEST['users'];
 		}
diff --git a/src/wp-comments-post.php b/src/wp-comments-post.php
index bc66862a7b..06cbd460f4 100644
--- a/src/wp-comments-post.php
+++ b/src/wp-comments-post.php
@@ -24,7 +24,7 @@
 
 $comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
 if ( is_wp_error( $comment ) ) {
-	$data = intval( $comment->get_error_data() );
+	$data = (int) $comment->get_error_data();
 	if ( ! empty( $data ) ) {
 		wp_die(
 			'<p>' . $comment->get_error_message() . '</p>',
diff --git a/src/wp-content/themes/twentyfourteen/inc/template-tags.php b/src/wp-content/themes/twentyfourteen/inc/template-tags.php
index 69ef45e736..413457f87d 100644
--- a/src/wp-content/themes/twentyfourteen/inc/template-tags.php
+++ b/src/wp-content/themes/twentyfourteen/inc/template-tags.php
@@ -24,7 +24,7 @@ function twentyfourteen_paging_nav() {
 			return;
 		}
 
-		$paged        = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
+		$paged        = get_query_var( 'paged' ) ? (int) get_query_var( 'paged' ) : 1;
 		$pagenum_link = html_entity_decode( get_pagenum_link() );
 		$query_args   = array();
 		$url_parts    = explode( '?', $pagenum_link );
diff --git a/src/wp-includes/bookmark.php b/src/wp-includes/bookmark.php
index b9cfc63765..e4d3d3571a 100644
--- a/src/wp-includes/bookmark.php
+++ b/src/wp-includes/bookmark.php
@@ -436,7 +436,7 @@ function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) {
 		$value = apply_filters( "pre_{$field}", $value );
 	} else {
 		/** This filter is documented in wp-includes/post.php */
-		$value = apply_filters( "{$field}", $value, $bookmark_id, $context );
+		$value = apply_filters( (string) ( $field ), $value, $bookmark_id, $context );
 
 		if ( 'attribute' === $context ) {
 			$value = esc_attr( $value );
diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
index bfb23264d1..24505af4ed 100644
--- a/src/wp-includes/category-template.php
+++ b/src/wp-includes/category-template.php
@@ -433,7 +433,7 @@ function wp_dropdown_categories( $args = '' ) {
 
 			/** This filter is documented in wp-includes/category-template.php */
 			$show_option_all = apply_filters( 'list_cats', $parsed_args['show_option_all'], null );
-			$selected        = ( '0' === strval( $parsed_args['selected'] ) ) ? " selected='selected'" : '';
+			$selected        = ( '0' === (string) $parsed_args['selected'] ) ? " selected='selected'" : '';
 			$output         .= "\t<option value='0'$selected>$show_option_all</option>\n";
 		}
 
@@ -736,7 +736,7 @@ function wp_tag_cloud( $args = '' ) {
 		if ( 'edit' === $args['link'] ) {
 			$link = get_edit_term_link( $tag->term_id, $tag->taxonomy, $args['post_type'] );
 		} else {
-			$link = get_term_link( intval( $tag->term_id ), $tag->taxonomy );
+			$link = get_term_link( (int) $tag->term_id, $tag->taxonomy );
 		}
 
 		if ( is_wp_error( $link ) ) {
diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php
index aee80a8886..8211408101 100644
--- a/src/wp-includes/class-http.php
+++ b/src/wp-includes/class-http.php
@@ -752,7 +752,7 @@ public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore W
 		}
 
 		// Cast the Response Code to an int.
-		$response['code'] = intval( $response['code'] );
+		$response['code'] = (int) $response['code'];
 
 		return array(
 			'response' => $response,
diff --git a/src/wp-includes/class-json.php b/src/wp-includes/class-json.php
index 7df464c374..66443e1068 100644
--- a/src/wp-includes/class-json.php
+++ b/src/wp-includes/class-json.php
@@ -579,7 +579,7 @@ function name_value($name, $value)
             return $encoded_value;
         }
 
-        return $this->_encode(strval($name)) . ':' . $encoded_value;
+        return $this->_encode((string) $name) . ':' . $encoded_value;
     }
 
    /**
diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
index bbc6fe2d66..d78efa5d70 100644
--- a/src/wp-includes/class-wp-comment-query.php
+++ b/src/wp-includes/class-wp-comment-query.php
@@ -439,7 +439,7 @@ public function get_comments() {
 		// If querying for a count only, there's nothing more to do.
 		if ( $this->query_vars['count'] ) {
 			// $comment_ids is actually a count in this case.
-			return intval( $comment_ids );
+			return (int) $comment_ids;
 		}
 
 		$comment_ids = array_map( 'intval', $comment_ids );
@@ -925,7 +925,7 @@ protected function get_comment_ids() {
 		$this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
 
 		if ( $this->query_vars['count'] ) {
-			return intval( $wpdb->get_var( $this->request ) );
+			return (int) $wpdb->get_var( $this->request );
 		} else {
 			$comment_ids = $wpdb->get_col( $this->request );
 			return array_map( 'intval', $comment_ids );
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index 79f2b3eab3..6be63d474a 100644
--- a/src/wp-includes/class-wp-customize-manager.php
+++ b/src/wp-includes/class-wp-customize-manager.php
@@ -1461,7 +1461,7 @@ function import_theme_starter_content( $starter_content = array() ) {
 					preg_match( '#^nav_menu\[(?P<nav_menu_id>-?\d+)\]$#', $setting_id, $matches )
 				);
 				if ( $can_reuse ) {
-					$nav_menu_term_id              = intval( $matches['nav_menu_id'] );
+					$nav_menu_term_id              = (int) $matches['nav_menu_id'];
 					$nav_menu_setting_id           = $setting_id;
 					$reused_nav_menu_setting_ids[] = $setting_id;
 					break;
@@ -3266,7 +3266,7 @@ public function refresh_changeset_lock( $changeset_post_id ) {
 		$lock = explode( ':', $lock );
 
 		if ( $lock && ! empty( $lock[1] ) ) {
-			$user_id         = intval( $lock[1] );
+			$user_id         = (int) $lock[1];
 			$current_user_id = get_current_user_id();
 			if ( $user_id === $current_user_id ) {
 				$lock = sprintf( '%s:%s', time(), $user_id );
diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php
index 48104112e0..145ded9d7c 100644
--- a/src/wp-includes/class-wp-customize-nav-menus.php
+++ b/src/wp-includes/class-wp-customize-nav-menus.php
@@ -249,8 +249,8 @@ public function load_available_items_query( $type = 'post_type', $object = 'page
 					'type'       => 'post_type',
 					'type_label' => $post_type_label,
 					'object'     => $post->post_type,
-					'object_id'  => intval( $post->ID ),
-					'url'        => get_permalink( intval( $post->ID ) ),
+					'object_id'  => (int) $post->ID,
+					'url'        => get_permalink( (int) $post->ID ),
 				);
 			}
 		} elseif ( 'taxonomy' === $type ) {
@@ -281,8 +281,8 @@ public function load_available_items_query( $type = 'post_type', $object = 'page
 					'type'       => 'taxonomy',
 					'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
 					'object'     => $term->taxonomy,
-					'object_id'  => intval( $term->term_id ),
-					'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
+					'object_id'  => (int) $term->term_id,
+					'url'        => get_term_link( (int) $term->term_id, $term->taxonomy ),
 				);
 			}
 		}
@@ -410,8 +410,8 @@ public function search_available_items_query( $args = array() ) {
 				'type'       => 'post_type',
 				'type_label' => $post_type_label,
 				'object'     => $post->post_type,
-				'object_id'  => intval( $post->ID ),
-				'url'        => get_permalink( intval( $post->ID ) ),
+				'object_id'  => (int) $post->ID,
+				'url'        => get_permalink( (int) $post->ID ),
 			);
 		}
 
@@ -436,8 +436,8 @@ public function search_available_items_query( $args = array() ) {
 					'type'       => 'taxonomy',
 					'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
 					'object'     => $term->taxonomy,
-					'object_id'  => intval( $term->term_id ),
-					'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
+					'object_id'  => (int) $term->term_id,
+					'url'        => get_term_link( (int) $term->term_id, $term->taxonomy ),
 				);
 			}
 		}
diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php
index be137eafee..ed9bbe3dfd 100644
--- a/src/wp-includes/class-wp-customize-widgets.php
+++ b/src/wp-includes/class-wp-customize-widgets.php
@@ -605,7 +605,7 @@ public function parse_widget_id( $widget_id ) {
 
 		if ( preg_match( '/^(.+)-(\d+)$/', $widget_id, $matches ) ) {
 			$parsed['id_base'] = $matches[1];
-			$parsed['number']  = intval( $matches[2] );
+			$parsed['number']  = (int) $matches[2];
 		} else {
 			// Likely an old single widget.
 			$parsed['id_base'] = $widget_id;
@@ -628,7 +628,7 @@ public function parse_widget_setting_id( $setting_id ) {
 		}
 
 		$id_base = $matches[2];
-		$number  = isset( $matches[3] ) ? intval( $matches[3] ) : null;
+		$number  = isset( $matches[3] ) ? (int) $matches[3] : null;
 
 		return compact( 'id_base', 'number' );
 	}
@@ -1772,7 +1772,7 @@ public function start_dynamic_sidebar( $index ) {
 		}
 		$this->sidebar_instance_count[ $index ] += 1;
 		if ( ! $this->manager->selective_refresh->is_render_partials_request() ) {
-			printf( "\n<!--dynamic_sidebar_before:%s:%d-->\n", esc_html( $index ), intval( $this->sidebar_instance_count[ $index ] ) );
+			printf( "\n<!--dynamic_sidebar_before:%s:%d-->\n", esc_html( $index ), (int) $this->sidebar_instance_count[ $index ] );
 		}
 	}
 
@@ -1788,7 +1788,7 @@ public function start_dynamic_sidebar( $index ) {
 	public function end_dynamic_sidebar( $index ) {
 		array_shift( $this->current_dynamic_sidebar_id_stack );
 		if ( ! $this->manager->selective_refresh->is_render_partials_request() ) {
-			printf( "\n<!--dynamic_sidebar_after:%s:%d-->\n", esc_html( $index ), intval( $this->sidebar_instance_count[ $index ] ) );
+			printf( "\n<!--dynamic_sidebar_after:%s:%d-->\n", esc_html( $index ), (int) $this->sidebar_instance_count[ $index ] );
 		}
 	}
 
@@ -1851,7 +1851,7 @@ public function render_widget_partial( $partial, $context ) {
 		$this->rendering_sidebar_id = $context['sidebar_id'];
 
 		if ( isset( $context['sidebar_instance_number'] ) ) {
-			$this->context_sidebar_instance_number = intval( $context['sidebar_instance_number'] );
+			$this->context_sidebar_instance_number = (int) $context['sidebar_instance_number'];
 		}
 
 		// Filter sidebars_widgets so that only the queried widget is in the sidebar.
diff --git a/src/wp-includes/class-wp-date-query.php b/src/wp-includes/class-wp-date-query.php
index 6fe305fffe..1bab5ef2c8 100644
--- a/src/wp-includes/class-wp-date-query.php
+++ b/src/wp-includes/class-wp-date-query.php
@@ -874,32 +874,32 @@ public function build_mysql_datetime( $datetime, $default_to_max = false ) {
 			if ( preg_match( '/^(\d{4})$/', $datetime, $matches ) ) {
 				// Y
 				$datetime = array(
-					'year' => intval( $matches[1] ),
+					'year' => (int) $matches[1],
 				);
 
 			} elseif ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) {
 				// Y-m
 				$datetime = array(
-					'year'  => intval( $matches[1] ),
-					'month' => intval( $matches[2] ),
+					'year'  => (int) $matches[1],
+					'month' => (int) $matches[2],
 				);
 
 			} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) {
 				// Y-m-d
 				$datetime = array(
-					'year'  => intval( $matches[1] ),
-					'month' => intval( $matches[2] ),
-					'day'   => intval( $matches[3] ),
+					'year'  => (int) $matches[1],
+					'month' => (int) $matches[2],
+					'day'   => (int) $matches[3],
 				);
 
 			} elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) {
 				// Y-m-d H:i
 				$datetime = array(
-					'year'   => intval( $matches[1] ),
-					'month'  => intval( $matches[2] ),
-					'day'    => intval( $matches[3] ),
-					'hour'   => intval( $matches[4] ),
-					'minute' => intval( $matches[5] ),
+					'year'   => (int) $matches[1],
+					'month'  => (int) $matches[2],
+					'day'    => (int) $matches[3],
+					'hour'   => (int) $matches[4],
+					'minute' => (int) $matches[5],
 				);
 			}
 
diff --git a/src/wp-includes/class-wp-http-curl.php b/src/wp-includes/class-wp-http-curl.php
index dd4cab9229..9b6e0eb10b 100644
--- a/src/wp-includes/class-wp-http-curl.php
+++ b/src/wp-includes/class-wp-http-curl.php
@@ -173,7 +173,7 @@ public function request( $url, $args = array() ) {
 		curl_setopt( $handle, CURLOPT_HEADER, false );
 
 		if ( isset( $parsed_args['limit_response_size'] ) ) {
-			$this->max_body_length = intval( $parsed_args['limit_response_size'] );
+			$this->max_body_length = (int) $parsed_args['limit_response_size'];
 		} else {
 			$this->max_body_length = false;
 		}
diff --git a/src/wp-includes/class-wp-matchesmapregex.php b/src/wp-includes/class-wp-matchesmapregex.php
index 334026f86e..cdb39077e2 100644
--- a/src/wp-includes/class-wp-matchesmapregex.php
+++ b/src/wp-includes/class-wp-matchesmapregex.php
@@ -83,7 +83,7 @@ private function _map() {
 	 * @return string
 	 */
 	public function callback( $matches ) {
-		$index = intval( substr( $matches[0], 9, -1 ) );
+		$index = (int) substr( $matches[0], 9, -1 );
 		return ( isset( $this->_matches[ $index ] ) ? urlencode( $this->_matches[ $index ] ) : '' );
 	}
 }
diff --git a/src/wp-includes/class-wp-network-query.php b/src/wp-includes/class-wp-network-query.php
index c3d3fa1284..06d784db01 100644
--- a/src/wp-includes/class-wp-network-query.php
+++ b/src/wp-includes/class-wp-network-query.php
@@ -257,7 +257,7 @@ public function get_networks() {
 		// If querying for a count only, there's nothing more to do.
 		if ( $this->query_vars['count'] ) {
 			// $network_ids is actually a count in this case.
-			return intval( $network_ids );
+			return (int) $network_ids;
 		}
 
 		$network_ids = array_map( 'intval', $network_ids );
@@ -466,7 +466,7 @@ protected function get_network_ids() {
 		$this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
 
 		if ( $this->query_vars['count'] ) {
-			return intval( $wpdb->get_var( $this->request ) );
+			return (int) $wpdb->get_var( $this->request );
 		}
 
 		$network_ids = $wpdb->get_col( $this->request );
diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
index a2451bcd01..e098b95d5f 100644
--- a/src/wp-includes/class-wp-query.php
+++ b/src/wp-includes/class-wp-query.php
@@ -763,7 +763,7 @@ public function parse_query( $query = '' ) {
 			$qv['p']     = 0;
 			$qv['error'] = '404';
 		} else {
-			$qv['p'] = intval( $qv['p'] );
+			$qv['p'] = (int) $qv['p'];
 		}
 
 		$qv['page_id']  = absint( $qv['page_id'] );
@@ -942,7 +942,7 @@ public function parse_query( $query = '' ) {
 			$this->is_trackback = true;
 		}
 
-		if ( '' != $qv['paged'] && ( intval( $qv['paged'] ) > 1 ) ) {
+		if ( '' != $qv['paged'] && ( (int) $qv['paged'] > 1 ) ) {
 			$this->is_paged = true;
 		}
 
@@ -1604,7 +1604,7 @@ protected function parse_orderby( $orderby ) {
 		// If RAND() contains a seed value, sanitize and add to allowed keys.
 		$rand_with_seed = false;
 		if ( preg_match( '/RAND\(([0-9]+)\)/i', $orderby, $matches ) ) {
-			$orderby        = sprintf( 'RAND(%s)', intval( $matches[1] ) );
+			$orderby        = sprintf( 'RAND(%s)', (int) $matches[1] );
 			$allowed_keys[] = $orderby;
 			$rand_with_seed = true;
 		}
@@ -2263,7 +2263,7 @@ public function get_posts() {
 			// Numeric comment count is converted to array format.
 			if ( is_numeric( $q['comment_count'] ) ) {
 				$q['comment_count'] = array(
-					'value' => intval( $q['comment_count'] ),
+					'value' => (int) $q['comment_count'],
 				);
 			}
 
diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php
index 702488fc06..f87fd35d9e 100644
--- a/src/wp-includes/class-wp-site-query.php
+++ b/src/wp-includes/class-wp-site-query.php
@@ -348,7 +348,7 @@ public function get_sites() {
 		// If querying for a count only, there's nothing more to do.
 		if ( $this->query_vars['count'] ) {
 			// $site_ids is actually a count in this case.
-			return intval( $site_ids );
+			return (int) $site_ids;
 		}
 
 		$site_ids = array_map( 'intval', $site_ids );
@@ -657,7 +657,7 @@ protected function get_site_ids() {
 		$this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
 
 		if ( $this->query_vars['count'] ) {
-			return intval( $wpdb->get_var( $this->request ) );
+			return (int) $wpdb->get_var( $this->request );
 		}
 
 		$site_ids = $wpdb->get_col( $this->request );
diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php
index 4009e100d3..a2ecfef945 100644
--- a/src/wp-includes/class-wp-term-query.php
+++ b/src/wp-includes/class-wp-term-query.php
@@ -258,7 +258,7 @@ public function parse_query( $query = '' ) {
 		$query['offset'] = absint( $query['offset'] );
 
 		// 'parent' overrides 'child_of'.
-		if ( 0 < intval( $query['parent'] ) ) {
+		if ( 0 < (int) $query['parent'] ) {
 			$query['child_of'] = false;
 		}
 
@@ -346,7 +346,7 @@ public function get_terms() {
 		}
 
 		// 'parent' overrides 'child_of'.
-		if ( 0 < intval( $args['parent'] ) ) {
+		if ( 0 < (int) $args['parent'] ) {
 			$args['child_of'] = false;
 		}
 
@@ -443,7 +443,7 @@ public function get_terms() {
 					(array) get_terms(
 						array(
 							'taxonomy'   => reset( $taxonomies ),
-							'child_of'   => intval( $extrunk ),
+							'child_of'   => (int) $extrunk,
 							'fields'     => 'ids',
 							'hide_empty' => 0,
 						)
diff --git a/src/wp-includes/class-wp-user.php b/src/wp-includes/class-wp-user.php
index f9582df7c6..16f4a52c7f 100644
--- a/src/wp-includes/class-wp-user.php
+++ b/src/wp-includes/class-wp-user.php
@@ -199,7 +199,7 @@ public static function get_data_by( $field, $value ) {
 			if ( ! is_numeric( $value ) ) {
 				return false;
 			}
-			$value = intval( $value );
+			$value = (int) $value;
 			if ( $value < 1 ) {
 				return false;
 			}
@@ -645,7 +645,7 @@ public function set_role( $role ) {
 	 */
 	public function level_reduction( $max, $item ) {
 		if ( preg_match( '/^level_(10|[0-9])$/i', $item, $matches ) ) {
-			$level = intval( $matches[1] );
+			$level = (int) $matches[1];
 			return max( $max, $level );
 		} else {
 			return $max;
diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
index d89701cc21..220e2f94ae 100644
--- a/src/wp-includes/class-wp-xmlrpc-server.php
+++ b/src/wp-includes/class-wp-xmlrpc-server.php
@@ -798,13 +798,13 @@ protected function _prepare_term( $term ) {
 		}
 
 		// For integers which may be larger than XML-RPC supports ensure we return strings.
-		$_term['term_id']          = strval( $_term['term_id'] );
-		$_term['term_group']       = strval( $_term['term_group'] );
-		$_term['term_taxonomy_id'] = strval( $_term['term_taxonomy_id'] );
-		$_term['parent']           = strval( $_term['parent'] );
+		$_term['term_id']          = (string) $_term['term_id'];
+		$_term['term_group']       = (string) $_term['term_group'];
+		$_term['term_taxonomy_id'] = (string) $_term['term_taxonomy_id'];
+		$_term['parent']           = (string) $_term['parent'];
 
 		// Count we are happy to return as an integer because people really shouldn't use terms that much.
-		$_term['count'] = intval( $_term['count'] );
+		$_term['count'] = (int) $_term['count'];
 
 		// Get term meta.
 		$_term['custom_fields'] = $this->get_term_custom_fields( $_term['term_id'] );
@@ -856,7 +856,7 @@ protected function _convert_date_gmt( $date_gmt, $date ) {
 	 */
 	protected function _prepare_post( $post, $fields ) {
 		// Holds the data for this post. built up based on $fields.
-		$_post = array( 'post_id' => strval( $post['ID'] ) );
+		$_post = array( 'post_id' => (string) $post['ID'] );
 
 		// Prepare common post fields.
 		$post_fields = array(
@@ -872,11 +872,11 @@ protected function _prepare_post( $post, $fields ) {
 			'post_password'     => $post['post_password'],
 			'post_excerpt'      => $post['post_excerpt'],
 			'post_content'      => $post['post_content'],
-			'post_parent'       => strval( $post['post_parent'] ),
+			'post_parent'       => (string) $post['post_parent'],
 			'post_mime_type'    => $post['post_mime_type'],
 			'link'              => get_permalink( $post['ID'] ),
 			'guid'              => $post['guid'],
-			'menu_order'        => intval( $post['menu_order'] ),
+			'menu_order'        => (int) $post['menu_order'],
 			'comment_status'    => $post['comment_status'],
 			'ping_status'       => $post['ping_status'],
 			'sticky'            => ( 'post' === $post['post_type'] && is_sticky( $post['ID'] ) ),
@@ -1009,7 +1009,7 @@ protected function _prepare_post_type( $post_type, $fields ) {
 	 */
 	protected function _prepare_media_item( $media_item, $thumbnail_size = 'thumbnail' ) {
 		$_media_item = array(
-			'attachment_id'    => strval( $media_item->ID ),
+			'attachment_id'    => (string) $media_item->ID,
 			'date_created_gmt' => $this->_convert_date_gmt( $media_item->post_date_gmt, $media_item->post_date ),
 			'parent'           => $media_item->post_parent,
 			'link'             => wp_get_attachment_url( $media_item->ID ),
@@ -1174,7 +1174,7 @@ protected function _prepare_comment( $comment ) {
 	 * @return array The prepared user data.
 	 */
 	protected function _prepare_user( $user, $fields ) {
-		$_user = array( 'user_id' => strval( $user->ID ) );
+		$_user = array( 'user_id' => (string) $user->ID );
 
 		$user_fields = array(
 			'username'     => $user->user_login,
@@ -1646,7 +1646,7 @@ protected function _insert_post( $user, $content_struct ) {
 			}
 		}
 
-		return strval( $post_ID );
+		return (string) $post_ID;
 	}
 
 	/**
@@ -2093,7 +2093,7 @@ public function wp_newTerm( $args ) {
 			$this->set_term_custom_fields( $term['term_id'], $content_struct['custom_fields'] );
 		}
 
-		return strval( $term['term_id'] );
+		return (string) $term['term_id'];
 	}
 
 	/**
@@ -5565,7 +5565,7 @@ public function mw_newPost( $args ) {
 		 */
 		do_action( 'xmlrpc_call_success_mw_newPost', $post_ID, $args ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
 
-		return strval( $post_ID );
+		return (string) $post_ID;
 	}
 
 	/**
@@ -6554,7 +6554,7 @@ public function mt_getPostCategories( $args ) {
 		do_action( 'xmlrpc_call', 'mt.getPostCategories' );
 
 		$categories = array();
-		$catids     = wp_get_post_categories( intval( $post_ID ) );
+		$catids     = wp_get_post_categories( (int) $post_ID );
 		// First listed category will be the primary category.
 		$isPrimary = true;
 		foreach ( $catids as $catid ) {
@@ -6811,7 +6811,7 @@ public function pingback_ping( $args ) {
 			$post_ID = (int) $blah[1];
 		} elseif ( isset( $urltest['fragment'] ) ) {
 			// An #anchor is there, it's either...
-			if ( intval( $urltest['fragment'] ) ) {
+			if ( (int) $urltest['fragment'] ) {
 				// ...an integer #XXXX (simplest case),
 				$post_ID = (int) $urltest['fragment'];
 			} elseif ( preg_match( '/post-[0-9]+/', $urltest['fragment'] ) ) {
diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
index d3417db02b..89be475034 100644
--- a/src/wp-includes/comment-template.php
+++ b/src/wp-includes/comment-template.php
@@ -604,7 +604,7 @@ function get_comment_excerpt( $comment_ID = 0 ) {
 	}
 
 	/* translators: Maximum number of words used in a comment excerpt. */
-	$comment_excerpt_length = intval( _x( '20', 'comment_excerpt_length' ) );
+	$comment_excerpt_length = (int) _x( '20', 'comment_excerpt_length' );
 
 	/**
 	 * Filters the maximum number of words used in the comment excerpt.
@@ -2205,7 +2205,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
 		}
 	}
 	// Validation check.
-	$parsed_args['page'] = intval( $parsed_args['page'] );
+	$parsed_args['page'] = (int) $parsed_args['page'];
 	if ( 0 == $parsed_args['page'] && 0 != $parsed_args['per_page'] ) {
 		$parsed_args['page'] = 1;
 	}
diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index 10e9d864ad..6b722529fc 100644
--- a/src/wp-includes/comment.php
+++ b/src/wp-includes/comment.php
@@ -1254,7 +1254,7 @@ function wp_get_comment_fields_max_lengths() {
 
 			if ( ! is_array( $col_length ) && (int) $col_length > 0 ) {
 				$max_length = (int) $col_length;
-			} elseif ( is_array( $col_length ) && isset( $col_length['length'] ) && intval( $col_length['length'] ) > 0 ) {
+			} elseif ( is_array( $col_length ) && isset( $col_length['length'] ) && (int) $col_length['length'] > 0 ) {
 				$max_length = (int) $col_length['length'];
 
 				if ( ! empty( $col_length['type'] ) && 'byte' === $col_length['type'] ) {
diff --git a/src/wp-includes/customize/class-wp-customize-date-time-control.php b/src/wp-includes/customize/class-wp-customize-date-time-control.php
index 0d88b378bc..54671896fa 100644
--- a/src/wp-includes/customize/class-wp-customize-date-time-control.php
+++ b/src/wp-includes/customize/class-wp-customize-date-time-control.php
@@ -81,8 +81,8 @@ public function render_content() {}
 	public function json() {
 		$data = parent::json();
 
-		$data['maxYear']          = intval( $this->max_year );
-		$data['minYear']          = intval( $this->min_year );
+		$data['maxYear']          = (int) $this->max_year;
+		$data['minYear']          = (int) $this->min_year;
 		$data['allowPastDate']    = (bool) $this->allow_past_date;
 		$data['twelveHourFormat'] = (bool) $this->twelve_hour_format;
 		$data['includeTime']      = (bool) $this->include_time;
@@ -245,7 +245,7 @@ public function get_timezone_info() {
 				$timezone_info['description'] = '';
 			}
 		} else {
-			$formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) );
+			$formatted_gmt_offset = $this->format_gmt_offset( (int) get_option( 'gmt_offset', 0 ) );
 
 			$timezone_info['description'] = sprintf(
 				/* translators: 1: UTC abbreviation and offset, 2: UTC offset. */
diff --git a/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php b/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
index 46601a9e18..5da6515f5f 100644
--- a/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
+++ b/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
@@ -171,7 +171,7 @@ public function __construct( WP_Customize_Manager $manager, $id, array $args = a
 			throw new Exception( "Illegal widget setting ID: $id" );
 		}
 
-		$this->post_id = intval( $matches['id'] );
+		$this->post_id = (int) $matches['id'];
 		add_action( 'wp_update_nav_menu_item', array( $this, 'flush_cached_value' ), 10, 2 );
 
 		parent::__construct( $manager, $id, $args );
@@ -368,7 +368,7 @@ protected function populate_value() {
 
 		foreach ( array( 'object_id', 'menu_item_parent', 'nav_menu_term_id' ) as $key ) {
 			if ( ! is_int( $this->value[ $key ] ) ) {
-				$this->value[ $key ] = intval( $this->value[ $key ] );
+				$this->value[ $key ] = (int) $this->value[ $key ];
 			}
 		}
 		foreach ( array( 'classes', 'xfn' ) as $key ) {
@@ -684,11 +684,11 @@ public function sanitize( $menu_item_value ) {
 		);
 		$menu_item_value             = array_merge( $default, $menu_item_value );
 		$menu_item_value             = wp_array_slice_assoc( $menu_item_value, array_keys( $default ) );
-		$menu_item_value['position'] = intval( $menu_item_value['position'] );
+		$menu_item_value['position'] = (int) $menu_item_value['position'];
 
 		foreach ( array( 'object_id', 'menu_item_parent', 'nav_menu_term_id' ) as $key ) {
 			// Note we need to allow negative-integer IDs for previewed objects not inserted yet.
-			$menu_item_value[ $key ] = intval( $menu_item_value[ $key ] );
+			$menu_item_value[ $key ] = (int) $menu_item_value[ $key ];
 		}
 
 		foreach ( array( 'type', 'object', 'target' ) as $key ) {
@@ -798,7 +798,7 @@ protected function update( $value ) {
 					return;
 				}
 
-				if ( intval( $value['nav_menu_term_id'] ) !== $nav_menu_setting->previous_term_id ) {
+				if ( (int) $value['nav_menu_term_id'] !== $nav_menu_setting->previous_term_id ) {
 					$this->update_status = 'error';
 					$this->update_error  = new WP_Error( 'unexpected_previous_term_id' );
 					return;
@@ -824,7 +824,7 @@ protected function update( $value ) {
 					return;
 				}
 
-				if ( intval( $value['menu_item_parent'] ) !== $parent_nav_menu_item_setting->previous_post_id ) {
+				if ( (int) $value['menu_item_parent'] !== $parent_nav_menu_item_setting->previous_post_id ) {
 					$this->update_status = 'error';
 					$this->update_error  = new WP_Error( 'unexpected_previous_post_id' );
 					return;
diff --git a/src/wp-includes/customize/class-wp-customize-nav-menu-section.php b/src/wp-includes/customize/class-wp-customize-nav-menu-section.php
index bbb5f95e7d..225d035eef 100644
--- a/src/wp-includes/customize/class-wp-customize-nav-menu-section.php
+++ b/src/wp-includes/customize/class-wp-customize-nav-menu-section.php
@@ -34,7 +34,7 @@ class WP_Customize_Nav_Menu_Section extends WP_Customize_Section {
 	 */
 	public function json() {
 		$exported            = parent::json();
-		$exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ) );
+		$exported['menu_id'] = (int) preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id );
 
 		return $exported;
 	}
diff --git a/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php b/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php
index 1b0de422ab..8962606e5c 100644
--- a/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php
+++ b/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php
@@ -141,7 +141,7 @@ public function __construct( WP_Customize_Manager $manager, $id, array $args = a
 			throw new Exception( "Illegal widget setting ID: $id" );
 		}
 
-		$this->term_id = intval( $matches['id'] );
+		$this->term_id = (int) $matches['id'];
 
 		parent::__construct( $manager, $id, $args );
 	}
@@ -433,7 +433,7 @@ public function sanitize( $value ) {
 
 		$value['name']        = trim( esc_html( $value['name'] ) ); // This sanitization code is used in wp-admin/nav-menus.php.
 		$value['description'] = sanitize_text_field( $value['description'] );
-		$value['parent']      = max( 0, intval( $value['parent'] ) );
+		$value['parent']      = max( 0, (int) $value['parent'] );
 		$value['auto_add']    = ! empty( $value['auto_add'] );
 
 		if ( '' === $value['name'] ) {
@@ -556,7 +556,7 @@ protected function update( $value ) {
 				}
 
 				$post_value = $setting->post_value( null );
-				if ( ! is_null( $post_value ) && intval( $post_value ) === $this->previous_term_id ) {
+				if ( ! is_null( $post_value ) && (int) $post_value === $this->previous_term_id ) {
 					$this->manager->set_post_value( $setting->id, $this->term_id );
 					$setting->save();
 				}
@@ -570,7 +570,7 @@ protected function update( $value ) {
 				}
 
 				$widget_instance = $nav_menu_widget_setting->post_value(); // Note that this calls WP_Customize_Widgets::sanitize_widget_instance().
-				if ( empty( $widget_instance['nav_menu'] ) || intval( $widget_instance['nav_menu'] ) !== $this->previous_term_id ) {
+				if ( empty( $widget_instance['nav_menu'] ) || (int) $widget_instance['nav_menu'] !== $this->previous_term_id ) {
 					continue;
 				}
 
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 45922d6f65..28a7446fd8 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -3568,8 +3568,8 @@ function iso8601_timezone_to_offset( $timezone ) {
 		$offset = 0;
 	} else {
 		$sign    = ( '+' === substr( $timezone, 0, 1 ) ) ? 1 : -1;
-		$hours   = intval( substr( $timezone, 1, 2 ) );
-		$minutes = intval( substr( $timezone, 3, 4 ) ) / 60;
+		$hours   = (int) substr( $timezone, 1, 2 );
+		$minutes = (int) substr( $timezone, 3, 4 ) / 60;
 		$offset  = $sign * HOUR_IN_SECONDS * ( $hours + $minutes );
 	}
 	return $offset;
@@ -3820,7 +3820,7 @@ function wp_trim_excerpt( $text = '', $post = null ) {
 		$text = str_replace( ']]>', ']]&gt;', $text );
 
 		/* translators: Maximum number of words used in a post excerpt. */
-		$excerpt_length = intval( _x( '55', 'excerpt_length' ) );
+		$excerpt_length = (int) _x( '55', 'excerpt_length' );
 
 		/**
 		 * Filters the maximum number of words in a post excerpt.
@@ -4725,7 +4725,7 @@ function sanitize_option( $option, $value ) {
 			if ( null === $value ) {
 				$value = 1;
 			} else {
-				$value = intval( $value );
+				$value = (int) $value;
 			}
 			break;
 
@@ -5067,7 +5067,7 @@ function wp_sprintf( $pattern, ...$args ) {
 			if ( $_fragment != $fragment ) {
 				$fragment = $_fragment;
 			} else {
-				$fragment = sprintf( $fragment, strval( $arg ) );
+				$fragment = sprintf( $fragment, (string) $arg );
 			}
 		}
 
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 8d8e5001e2..ed9b86d11b 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -4719,7 +4719,7 @@ function dead_db() {
  * @return int A non-negative integer.
  */
 function absint( $maybeint ) {
-	return abs( intval( $maybeint ) );
+	return abs( (int) $maybeint );
 }
 
 /**
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 01e7fa72d1..d435a2f28a 100644
--- a/src/wp-includes/general-template.php
+++ b/src/wp-includes/general-template.php
@@ -1339,7 +1339,7 @@ function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
 	if ( is_archive() && ! empty( $m ) ) {
 		$my_year  = substr( $m, 0, 4 );
 		$my_month = $wp_locale->get_month( substr( $m, 4, 2 ) );
-		$my_day   = intval( substr( $m, 6, 2 ) );
+		$my_day   = (int) substr( $m, 6, 2 );
 		$title    = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' );
 	}
 
@@ -2223,7 +2223,7 @@ function get_calendar( $initial = true, $echo = true ) {
 
 	// Let's figure out when we are.
 	if ( ! empty( $monthnum ) && ! empty( $year ) ) {
-		$thismonth = zeroise( intval( $monthnum ), 2 );
+		$thismonth = zeroise( (int) $monthnum, 2 );
 		$thisyear  = (int) $year;
 	} elseif ( ! empty( $w ) ) {
 		// We need to get the month from MySQL.
@@ -3149,7 +3149,7 @@ function feed_links_extra( $args = array() ) {
 			$href  = get_term_feed_link( $term->term_id, $term->taxonomy );
 		}
 	} elseif ( is_author() ) {
-		$author_id = intval( get_query_var( 'author' ) );
+		$author_id = (int) get_query_var( 'author' );
 
 		$title = sprintf( $args['authortitle'], get_bloginfo( 'name' ), $args['separator'], get_the_author_meta( 'display_name', $author_id ) );
 		$href  = get_author_feed_link( $author_id );
@@ -3459,7 +3459,7 @@ function user_can_richedit() {
 
 		if ( 'true' === get_user_option( 'rich_editing' ) || ! is_user_logged_in() ) { // Default to 'true' for logged out users.
 			if ( $is_safari ) {
-				$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
+				$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && (int) $match[1] >= 534 );
 			} elseif ( $is_IE ) {
 				$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;' ) !== false );
 			} elseif ( $is_gecko || $is_chrome || $is_edge || ( $is_opera && ! wp_is_mobile() ) ) {
@@ -4195,7 +4195,7 @@ function paginate_links( $args = '' ) {
 
 	// Get max pages and current page out of the current query, if available.
 	$total   = isset( $wp_query->max_num_pages ) ? $wp_query->max_num_pages : 1;
-	$current = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
+	$current = get_query_var( 'paged' ) ? (int) get_query_var( 'paged' ) : 1;
 
 	// Append the format placeholder to the base URL.
 	$pagenum_link = trailingslashit( $url_parts[0] ) . '%_%';
diff --git a/src/wp-includes/http.php b/src/wp-includes/http.php
index d4acb41330..fba9dd3bba 100644
--- a/src/wp-includes/http.php
+++ b/src/wp-includes/http.php
@@ -668,7 +668,7 @@ function ms_allowed_http_request_hosts( $is_external, $host ) {
  */
 function wp_parse_url( $url, $component = -1 ) {
 	$to_unset = array();
-	$url      = strval( $url );
+	$url      = (string) $url;
 
 	if ( '//' === substr( $url, 0, 2 ) ) {
 		$to_unset[] = 'scheme';
diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
index 58366208b1..541f9f8c87 100644
--- a/src/wp-includes/link-template.php
+++ b/src/wp-includes/link-template.php
@@ -515,7 +515,7 @@ function get_month_link( $year, $month ) {
 	$monthlink = $wp_rewrite->get_month_permastruct();
 	if ( ! empty( $monthlink ) ) {
 		$monthlink = str_replace( '%year%', $year, $monthlink );
-		$monthlink = str_replace( '%monthnum%', zeroise( intval( $month ), 2 ), $monthlink );
+		$monthlink = str_replace( '%monthnum%', zeroise( (int) $month, 2 ), $monthlink );
 		$monthlink = home_url( user_trailingslashit( $monthlink, 'month' ) );
 	} else {
 		$monthlink = home_url( '?m=' . $year . zeroise( $month, 2 ) );
@@ -560,8 +560,8 @@ function get_day_link( $year, $month, $day ) {
 	$daylink = $wp_rewrite->get_day_permastruct();
 	if ( ! empty( $daylink ) ) {
 		$daylink = str_replace( '%year%', $year, $daylink );
-		$daylink = str_replace( '%monthnum%', zeroise( intval( $month ), 2 ), $daylink );
-		$daylink = str_replace( '%day%', zeroise( intval( $day ), 2 ), $daylink );
+		$daylink = str_replace( '%monthnum%', zeroise( (int) $month, 2 ), $daylink );
+		$daylink = str_replace( '%day%', zeroise( (int) $day, 2 ), $daylink );
 		$daylink = home_url( user_trailingslashit( $daylink, 'day' ) );
 	} else {
 		$daylink = home_url( '?m=' . $year . zeroise( $month, 2 ) . zeroise( $day, 2 ) );
@@ -2317,7 +2317,7 @@ function get_next_posts_page_link( $max_page = 0 ) {
 		if ( ! $paged ) {
 			$paged = 1;
 		}
-		$nextpage = intval( $paged ) + 1;
+		$nextpage = (int) $paged + 1;
 		if ( ! $max_page || $max_page >= $nextpage ) {
 			return get_pagenum_link( $nextpage );
 		}
@@ -2366,7 +2366,7 @@ function get_next_posts_link( $label = null, $max_page = 0 ) {
 		$paged = 1;
 	}
 
-	$nextpage = intval( $paged ) + 1;
+	$nextpage = (int) $paged + 1;
 
 	if ( null === $label ) {
 		$label = __( 'Next Page &raquo;' );
@@ -2415,7 +2415,7 @@ function get_previous_posts_page_link() {
 	global $paged;
 
 	if ( ! is_single() ) {
-		$nextpage = intval( $paged ) - 1;
+		$nextpage = (int) $paged - 1;
 		if ( $nextpage < 1 ) {
 			$nextpage = 1;
 		}
@@ -2888,7 +2888,7 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
 		$page = 1;
 	}
 
-	$nextpage = intval( $page ) + 1;
+	$nextpage = (int) $page + 1;
 
 	if ( empty( $max_page ) ) {
 		$max_page = $wp_query->max_num_comment_pages;
@@ -2943,11 +2943,11 @@ function get_previous_comments_link( $label = '' ) {
 
 	$page = get_query_var( 'cpage' );
 
-	if ( intval( $page ) <= 1 ) {
+	if ( (int) $page <= 1 ) {
 		return;
 	}
 
-	$prevpage = intval( $page ) - 1;
+	$prevpage = (int) $page - 1;
 
 	if ( empty( $label ) ) {
 		$label = __( '&laquo; Older Comments' );
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index e1091b9d8e..ef2423edfe 100644
--- a/src/wp-includes/media.php
+++ b/src/wp-includes/media.php
@@ -71,23 +71,23 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
 		$max_width  = $size[0];
 		$max_height = $size[1];
 	} elseif ( 'thumb' === $size || 'thumbnail' === $size ) {
-		$max_width  = intval( get_option( 'thumbnail_size_w' ) );
-		$max_height = intval( get_option( 'thumbnail_size_h' ) );
+		$max_width  = (int) get_option( 'thumbnail_size_w' );
+		$max_height = (int) get_option( 'thumbnail_size_h' );
 		// Last chance thumbnail size defaults.
 		if ( ! $max_width && ! $max_height ) {
 			$max_width  = 128;
 			$max_height = 96;
 		}
 	} elseif ( 'medium' === $size ) {
-		$max_width  = intval( get_option( 'medium_size_w' ) );
-		$max_height = intval( get_option( 'medium_size_h' ) );
+		$max_width  = (int) get_option( 'medium_size_w' );
+		$max_height = (int) get_option( 'medium_size_h' );
 
 	} elseif ( 'medium_large' === $size ) {
-		$max_width  = intval( get_option( 'medium_large_size_w' ) );
-		$max_height = intval( get_option( 'medium_large_size_h' ) );
+		$max_width  = (int) get_option( 'medium_large_size_w' );
+		$max_height = (int) get_option( 'medium_large_size_h' );
 
-		if ( intval( $content_width ) > 0 ) {
-			$max_width = min( intval( $content_width ), $max_width );
+		if ( (int) $content_width > 0 ) {
+			$max_width = min( (int) $content_width, $max_width );
 		}
 	} elseif ( 'large' === $size ) {
 		/*
@@ -96,18 +96,18 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
 		 * itself, and within the theme's content width if it's known. The user
 		 * can resize it in the editor if they wish.
 		 */
-		$max_width  = intval( get_option( 'large_size_w' ) );
-		$max_height = intval( get_option( 'large_size_h' ) );
+		$max_width  = (int) get_option( 'large_size_w' );
+		$max_height = (int) get_option( 'large_size_h' );
 
-		if ( intval( $content_width ) > 0 ) {
-			$max_width = min( intval( $content_width ), $max_width );
+		if ( (int) $content_width > 0 ) {
+			$max_width = min( (int) $content_width, $max_width );
 		}
 	} elseif ( ! empty( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ), true ) ) {
-		$max_width  = intval( $_wp_additional_image_sizes[ $size ]['width'] );
-		$max_height = intval( $_wp_additional_image_sizes[ $size ]['height'] );
+		$max_width  = (int) $_wp_additional_image_sizes[ $size ]['width'];
+		$max_height = (int) $_wp_additional_image_sizes[ $size ]['height'];
 		// Only in admin. Assume that theme authors know what they're doing.
-		if ( intval( $content_width ) > 0 && 'edit' === $context ) {
-			$max_width = min( intval( $content_width ), $max_width );
+		if ( (int) $content_width > 0 && 'edit' === $context ) {
+			$max_width = min( (int) $content_width, $max_width );
 		}
 	} else { // $size === 'full' has no constraint.
 		$max_width  = $width;
@@ -155,10 +155,10 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
 function image_hwstring( $width, $height ) {
 	$out = '';
 	if ( $width ) {
-		$out .= 'width="' . intval( $width ) . '" ';
+		$out .= 'width="' . (int) $width . '" ';
 	}
 	if ( $height ) {
-		$out .= 'height="' . intval( $height ) . '" ';
+		$out .= 'height="' . (int) $height . '" ';
 	}
 	return $out;
 }
@@ -778,7 +778,7 @@ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
 
 		foreach ( $imagedata['sizes'] as $_size => $data ) {
 			// If there's an exact match to an existing image size, short circuit.
-			if ( intval( $data['width'] ) === intval( $size[0] ) && intval( $data['height'] ) === intval( $size[1] ) ) {
+			if ( (int) $data['width'] === (int) $size[0] && (int) $data['height'] === (int) $size[1] ) {
 				$candidates[ $data['width'] * $data['height'] ] = $data;
 				break;
 			}
@@ -899,16 +899,16 @@ function wp_get_registered_image_subsizes() {
 
 		if ( isset( $additional_sizes[ $size_name ]['width'] ) ) {
 			// For sizes added by plugins and themes.
-			$size_data['width'] = intval( $additional_sizes[ $size_name ]['width'] );
+			$size_data['width'] = (int) $additional_sizes[ $size_name ]['width'];
 		} else {
 			// For default sizes set in options.
-			$size_data['width'] = intval( get_option( "{$size_name}_size_w" ) );
+			$size_data['width'] = (int) get_option( "{$size_name}_size_w" );
 		}
 
 		if ( isset( $additional_sizes[ $size_name ]['height'] ) ) {
-			$size_data['height'] = intval( $additional_sizes[ $size_name ]['height'] );
+			$size_data['height'] = (int) $additional_sizes[ $size_name ]['height'];
 		} else {
-			$size_data['height'] = intval( get_option( "{$size_name}_size_h" ) );
+			$size_data['height'] = (int) get_option( "{$size_name}_size_h" );
 		}
 
 		if ( empty( $size_data['width'] ) && empty( $size_data['height'] ) ) {
@@ -2213,7 +2213,7 @@ function gallery_shortcode( $attr ) {
 		'gallery'
 	);
 
-	$id = intval( $atts['id'] );
+	$id = (int) $atts['id'];
 
 	if ( ! empty( $atts['include'] ) ) {
 		$_attachments = get_posts(
@@ -2291,7 +2291,7 @@ function gallery_shortcode( $attr ) {
 		$icontag = 'dt';
 	}
 
-	$columns   = intval( $atts['columns'] );
+	$columns   = (int) $atts['columns'];
 	$itemwidth = $columns > 0 ? floor( 100 / $columns ) : 100;
 	$float     = is_rtl() ? 'right' : 'left';
 
@@ -2551,7 +2551,7 @@ function wp_playlist_shortcode( $attr ) {
 		'playlist'
 	);
 
-	$id = intval( $atts['id'] );
+	$id = (int) $atts['id'];
 
 	if ( 'audio' !== $atts['type'] ) {
 		$atts['type'] = 'video';
@@ -3330,7 +3330,7 @@ function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false )
 	);
 
 	foreach ( $attachments as $k => $attachment ) {
-		if ( intval( $attachment->ID ) === intval( $post->ID ) ) {
+		if ( (int) $attachment->ID === (int) $post->ID ) {
 			break;
 		}
 	}
@@ -4515,7 +4515,7 @@ function get_post_galleries( $post, $html = true ) {
 
 				// Specify the post ID of the gallery we're viewing if the shortcode doesn't reference another post already.
 				if ( ! isset( $shortcode_attrs['id'] ) ) {
-					$shortcode[3] .= ' id="' . intval( $post->ID ) . '"';
+					$shortcode[3] .= ' id="' . (int) $post->ID . '"';
 				}
 
 				$gallery = do_shortcode_tag( $shortcode );
diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
index 96ce28dee9..3cef8c1363 100644
--- a/src/wp-includes/meta.php
+++ b/src/wp-includes/meta.php
@@ -722,7 +722,7 @@ function get_metadata_by_mid( $meta_type, $meta_id ) {
 		return false;
 	}
 
-	$meta_id = intval( $meta_id );
+	$meta_id = (int) $meta_id;
 	if ( $meta_id <= 0 ) {
 		return false;
 	}
@@ -786,7 +786,7 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
 		return false;
 	}
 
-	$meta_id = intval( $meta_id );
+	$meta_id = (int) $meta_id;
 	if ( $meta_id <= 0 ) {
 		return false;
 	}
@@ -901,7 +901,7 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
 		return false;
 	}
 
-	$meta_id = intval( $meta_id );
+	$meta_id = (int) $meta_id;
 	if ( $meta_id <= 0 ) {
 		return false;
 	}
@@ -1062,7 +1062,7 @@ function update_meta_cache( $meta_type, $object_ids ) {
 
 	if ( ! empty( $meta_list ) ) {
 		foreach ( $meta_list as $metarow ) {
-			$mpid = intval( $metarow[ $column ] );
+			$mpid = (int) $metarow[ $column ];
 			$mkey = $metarow['meta_key'];
 			$mval = $metarow['meta_value'];
 
diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index bfb2b157e1..7d777b1fb0 100644
--- a/src/wp-includes/ms-functions.php
+++ b/src/wp-includes/ms-functions.php
@@ -708,7 +708,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
 		$mydomain = $blogname . '.' . preg_replace( '|^www\.|', '', $domain );
 		$path     = $base;
 	} else {
-		$mydomain = "$domain";
+		$mydomain = (string) $domain;
 		$path     = $base . $blogname . '/';
 	}
 	if ( domain_exists( $mydomain, $path, $current_network->id ) ) {
@@ -1970,7 +1970,7 @@ function global_terms( $term_id, $deprecated = '' ) {
 		return $term_id;
 	}
 
-	$term_id = intval( $term_id );
+	$term_id = (int) $term_id;
 	$c       = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->terms WHERE term_id = %d", $term_id ) );
 
 	$global_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM $wpdb->sitecategories WHERE category_nicename = %s", $c->slug ) );
diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php
index f7ceb7cf2b..10f2e77931 100644
--- a/src/wp-includes/nav-menu.php
+++ b/src/wp-includes/nav-menu.php
@@ -552,8 +552,8 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
 	$menu_item_db_id = (int) $menu_item_db_id;
 
 	update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key( $args['menu-item-type'] ) );
-	update_post_meta( $menu_item_db_id, '_menu_item_menu_item_parent', strval( (int) $args['menu-item-parent-id'] ) );
-	update_post_meta( $menu_item_db_id, '_menu_item_object_id', strval( (int) $args['menu-item-object-id'] ) );
+	update_post_meta( $menu_item_db_id, '_menu_item_menu_item_parent', (string) ( (int) $args['menu-item-parent-id'] ) );
+	update_post_meta( $menu_item_db_id, '_menu_item_object_id', (string) ( (int) $args['menu-item-object-id'] ) );
 	update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key( $args['menu-item-object'] ) );
 	update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key( $args['menu-item-target'] ) );
 
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index b2ed4642c5..a822ff3bea 100644
--- a/src/wp-includes/pluggable.php
+++ b/src/wp-includes/pluggable.php
@@ -2540,7 +2540,7 @@ function wp_rand( $min = 0, $max = 0 ) {
 			$value = $min + ( $max - $min + 1 ) * $value / ( $max_random_number + 1 );
 		}
 
-		return abs( intval( $value ) );
+		return abs( (int) $value );
 	}
 endif;
 
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index c0e5e1fc70..e49c44c994 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -2499,7 +2499,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
 			 *                        values include 'edit', 'display',
 			 *                        'attribute' and 'js'.
 			 */
-			$value = apply_filters( "{$field}", $value, $post_id, $context );
+			$value = apply_filters( (string) ( $field ), $value, $post_id, $context );
 		} else {
 			$value = apply_filters( "post_{$field}", $value, $post_id, $context );
 		}
@@ -4128,7 +4128,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
 		}
 
 		if ( $thumbnail_support ) {
-			$thumbnail_id = intval( $postarr['_thumbnail_id'] );
+			$thumbnail_id = (int) $postarr['_thumbnail_id'];
 			if ( -1 === $thumbnail_id ) {
 				delete_post_thumbnail( $post_ID );
 			} else {
@@ -4558,7 +4558,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
 		// Prevent new post slugs that could result in URLs that conflict with date archives.
 		$conflicts_with_date_archive = false;
 		if ( 'post' === $post_type && ( ! $post || $post->post_name !== $slug ) && preg_match( '/^[0-9]+$/', $slug ) ) {
-			$slug_num = intval( $slug );
+			$slug_num = (int) $slug;
 
 			if ( $slug_num ) {
 				$permastructs   = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) );
@@ -5229,7 +5229,7 @@ function get_page_children( $page_id, $pages ) {
 	// Build a hash of ID -> children.
 	$children = array();
 	foreach ( (array) $pages as $page ) {
-		$children[ intval( $page->post_parent ) ][] = $page;
+		$children[ (int) $page->post_parent ][] = $page;
 	}
 
 	$page_list = array();
@@ -5273,7 +5273,7 @@ function get_page_hierarchy( &$pages, $page_id = 0 ) {
 
 	$children = array();
 	foreach ( (array) $pages as $p ) {
-		$parent_id                = intval( $p->post_parent );
+		$parent_id                = (int) $p->post_parent;
 		$children[ $parent_id ][] = $p;
 	}
 
@@ -5482,7 +5482,7 @@ function get_pages( $args = array() ) {
 		if ( ! empty( $post_authors ) ) {
 			foreach ( $post_authors as $post_author ) {
 				// Do we have an author id or an author login?
-				if ( 0 == intval( $post_author ) ) {
+				if ( 0 == (int) $post_author ) {
 					$post_author = get_user_by( 'login', $post_author );
 					if ( empty( $post_author ) ) {
 						continue;
diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
index cbad102bbe..d4a3147394 100644
--- a/src/wp-includes/rest-api.php
+++ b/src/wp-includes/rest-api.php
@@ -1315,7 +1315,7 @@ function rest_is_boolean( $maybe_bool ) {
  * @return bool True if an integer, otherwise false.
  */
 function rest_is_integer( $maybe_integer ) {
-	return is_numeric( $maybe_integer ) && round( floatval( $maybe_integer ) ) === floatval( $maybe_integer );
+	return is_numeric( $maybe_integer ) && round( (float) $maybe_integer ) === (float) $maybe_integer;
 }
 
 /**
@@ -1933,7 +1933,7 @@ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
 	}
 
 	if ( 'string' === $args['type'] ) {
-		return strval( $value );
+		return (string) $value;
 	}
 
 	return $value;
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index 5b2abc794a..58aaa37a81 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
@@ -499,10 +499,10 @@ public function edit_media_item( $request ) {
 		if ( $crop ) {
 			$size = $image_editor->get_size();
 
-			$crop_x = round( ( $size['width'] * floatval( $request['x'] ) ) / 100.0 );
-			$crop_y = round( ( $size['height'] * floatval( $request['y'] ) ) / 100.0 );
-			$width  = round( ( $size['width'] * floatval( $request['width'] ) ) / 100.0 );
-			$height = round( ( $size['height'] * floatval( $request['height'] ) ) / 100.0 );
+			$crop_x = round( ( $size['width'] * (float) $request['x'] ) / 100.0 );
+			$crop_y = round( ( $size['height'] * (float) $request['y'] ) / 100.0 );
+			$width  = round( ( $size['width'] * (float) $request['width'] ) / 100.0 );
+			$height = round( ( $size['height'] * (float) $request['height'] ) / 100.0 );
 
 			$result = $image_editor->crop( $crop_x, $crop_y, $width, $height );
 
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
index 089a5215ba..e76940f7b7 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
@@ -128,10 +128,10 @@ public function prepare_item_for_response( $plugin, $request ) {
 			'description'         => wp_trim_words( $plugin['description'], 30, '...' ),
 			'id'                  => $plugin['slug'],
 			'rating'              => $plugin['rating'] / 20,
-			'rating_count'        => intval( $plugin['num_ratings'] ),
-			'active_installs'     => intval( $plugin['active_installs'] ),
+			'rating_count'        => (int) $plugin['num_ratings'],
+			'active_installs'     => (int) $plugin['active_installs'],
 			'author_block_rating' => $plugin['author_block_rating'] / 20,
-			'author_block_count'  => intval( $plugin['author_block_count'] ),
+			'author_block_count'  => (int) $plugin['author_block_count'],
 			'author'              => wp_strip_all_tags( $plugin['author'] ),
 			'icon'                => ( isset( $plugin['icons']['1x'] ) ? $plugin['icons']['1x'] : 'block-default' ),
 			'last_updated'        => gmdate( 'Y-m-d\TH:i:s', strtotime( $plugin['last_updated'] ) ),
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php
index 07a389e794..030f050f32 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php
@@ -109,7 +109,7 @@ public function register_routes() {
 	public function get_item_permissions_check( $request ) {
 		global $post;
 
-		$post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0;
+		$post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0;
 
 		if ( 0 < $post_id ) {
 			$post = get_post( $post_id );
@@ -149,7 +149,7 @@ public function get_item_permissions_check( $request ) {
 	public function get_item( $request ) {
 		global $post;
 
-		$post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0;
+		$post_id = isset( $request['post_id'] ) ? (int) $request['post_id'] : 0;
 
 		if ( 0 < $post_id ) {
 			$post = get_post( $post_id );
diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php
index 7bb7be1cb2..d7678bf74c 100644
--- a/src/wp-includes/revision.php
+++ b/src/wp-includes/revision.php
@@ -545,7 +545,7 @@ function wp_revisions_to_keep( $post ) {
 	if ( true === $num ) {
 		$num = -1;
 	} else {
-		$num = intval( $num );
+		$num = (int) $num;
 	}
 
 	if ( ! post_type_supports( $post->post_type, 'revisions' ) ) {
@@ -676,12 +676,12 @@ function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
 		return $value;
 	}
 
-	$thumbnail_id = intval( $_REQUEST['_thumbnail_id'] );
+	$thumbnail_id = (int) $_REQUEST['_thumbnail_id'];
 	if ( $thumbnail_id <= 0 ) {
 		return '';
 	}
 
-	return strval( $thumbnail_id );
+	return (string) $thumbnail_id;
 }
 
 /**
diff --git a/src/wp-includes/rewrite.php b/src/wp-includes/rewrite.php
index 3c7db94a65..1e239b0a1a 100644
--- a/src/wp-includes/rewrite.php
+++ b/src/wp-includes/rewrite.php
@@ -400,12 +400,12 @@ function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {
 	// If the date of the post doesn't match the date specified in the URL, resolve to the date archive.
 	if ( preg_match( '/^([0-9]{4})\-([0-9]{2})/', $post->post_date, $matches ) && isset( $query_vars['year'] ) && ( 'monthnum' === $compare || 'day' === $compare ) ) {
 		// $matches[1] is the year the post was published.
-		if ( intval( $query_vars['year'] ) !== intval( $matches[1] ) ) {
+		if ( (int) $query_vars['year'] !== (int) $matches[1] ) {
 			return $query_vars;
 		}
 
 		// $matches[2] is the month the post was published.
-		if ( 'day' === $compare && isset( $query_vars['monthnum'] ) && intval( $query_vars['monthnum'] ) !== intval( $matches[2] ) ) {
+		if ( 'day' === $compare && isset( $query_vars['monthnum'] ) && (int) $query_vars['monthnum'] !== (int) $matches[2] ) {
 			return $query_vars;
 		}
 	}
@@ -437,7 +437,7 @@ function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {
 
 	// If we've gotten to this point, we have a slug/date clash. First, adjust for nextpage.
 	if ( '' !== $maybe_page ) {
-		$query_vars['page'] = intval( $maybe_page );
+		$query_vars['page'] = (int) $maybe_page;
 	}
 
 	// Next, unset autodetected date-related query vars.
diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index cc491a87dd..db923f9371 100644
--- a/src/wp-includes/taxonomy.php
+++ b/src/wp-includes/taxonomy.php
@@ -1048,7 +1048,7 @@ function get_term_children( $term_id, $taxonomy ) {
 		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
 	}
 
-	$term_id = intval( $term_id );
+	$term_id = (int) $term_id;
 
 	$terms = _get_term_hierarchy( $taxonomy );
 
@@ -3490,9 +3490,9 @@ function get_object_term_cache( $id, $taxonomy ) {
 	$term_ids = array();
 	foreach ( $_term_ids as $term_id ) {
 		if ( is_numeric( $term_id ) ) {
-			$term_ids[] = intval( $term_id );
+			$term_ids[] = (int) $term_id;
 		} elseif ( isset( $term_id->term_id ) ) {
-			$term_ids[] = intval( $term_id->term_id );
+			$term_ids[] = (int) $term_id->term_id;
 		}
 	}
 
@@ -3948,12 +3948,12 @@ function _split_shared_term( $term_id, $term_taxonomy_id, $record = true ) {
 
 	if ( is_object( $term_id ) ) {
 		$shared_term = $term_id;
-		$term_id     = intval( $shared_term->term_id );
+		$term_id     = (int) $shared_term->term_id;
 	}
 
 	if ( is_object( $term_taxonomy_id ) ) {
 		$term_taxonomy    = $term_taxonomy_id;
-		$term_taxonomy_id = intval( $term_taxonomy->term_taxonomy_id );
+		$term_taxonomy_id = (int) $term_taxonomy->term_taxonomy_id;
 	}
 
 	// If there are no shared term_taxonomy rows, there's nothing to do here.
@@ -4120,7 +4120,7 @@ function _wp_batch_split_terms() {
 	// Rekey shared term array for faster lookups.
 	$_shared_terms = array();
 	foreach ( $shared_terms as $shared_term ) {
-		$term_id                   = intval( $shared_term->term_id );
+		$term_id                   = (int) $shared_term->term_id;
 		$_shared_terms[ $term_id ] = $shared_term;
 	}
 	$shared_terms = $_shared_terms;
@@ -4134,7 +4134,7 @@ function _wp_batch_split_terms() {
 	$skipped_first_term = array();
 	$taxonomies         = array();
 	foreach ( $shared_tts as $shared_tt ) {
-		$term_id = intval( $shared_tt->term_id );
+		$term_id = (int) $shared_tt->term_id;
 
 		// Don't split the first tt belonging to a given term_id.
 		if ( ! isset( $skipped_first_term[ $term_id ] ) ) {
diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php
index a5df68a40f..a946523d03 100644
--- a/src/wp-includes/update.php
+++ b/src/wp-includes/update.php
@@ -322,7 +322,7 @@ function wp_update_plugins( $extra_stats = array() ) {
 		foreach ( $plugins as $file => $p ) {
 			$new_option->checked[ $file ] = $p['Version'];
 
-			if ( ! isset( $current->checked[ $file ] ) || strval( $current->checked[ $file ] ) !== strval( $p['Version'] ) ) {
+			if ( ! isset( $current->checked[ $file ] ) || (string) $current->checked[ $file ] !== (string) $p['Version'] ) {
 				$plugin_changed = true;
 			}
 		}
@@ -527,7 +527,7 @@ function wp_update_themes( $extra_stats = array() ) {
 		$theme_changed = false;
 
 		foreach ( $checked as $slug => $v ) {
-			if ( ! isset( $last_update->checked[ $slug ] ) || strval( $last_update->checked[ $slug ] ) !== strval( $v ) ) {
+			if ( ! isset( $last_update->checked[ $slug ] ) || (string) $last_update->checked[ $slug ] !== (string) $v ) {
 				$theme_changed = true;
 			}
 		}
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 22a9639033..41343f358f 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -1316,7 +1316,7 @@ function sanitize_user_field( $field, $value, $user_id, $context ) {
 		if ( $prefixed ) {
 
 			/** This filter is documented in wp-includes/post.php */
-			$value = apply_filters( "{$field}", $value, $user_id, $context );
+			$value = apply_filters( (string) ( $field ), $value, $user_id, $context );
 		} else {
 
 			/**
diff --git a/src/wp-includes/vars.php b/src/wp-includes/vars.php
index 72259b2652..6aa98d53aa 100644
--- a/src/wp-includes/vars.php
+++ b/src/wp-includes/vars.php
@@ -134,7 +134,7 @@
  *
  * @global bool $is_iis7
  */
-$is_iis7 = $is_IIS && intval( substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) ) >= 7;
+$is_iis7 = $is_IIS && (int) substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) >= 7;
 
 /**
  * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
diff --git a/src/wp-includes/widgets/class-wp-widget-links.php b/src/wp-includes/widgets/class-wp-widget-links.php
index 92b2f5dd00..e90b558ade 100644
--- a/src/wp-includes/widgets/class-wp-widget-links.php
+++ b/src/wp-includes/widgets/class-wp-widget-links.php
@@ -109,8 +109,8 @@ public function update( $new_instance, $old_instance ) {
 			$instance['orderby'] = $new_instance['orderby'];
 		}
 
-		$instance['category'] = intval( $new_instance['category'] );
-		$instance['limit']    = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1;
+		$instance['category'] = (int) $new_instance['category'];
+		$instance['limit']    = ! empty( $new_instance['limit'] ) ? (int) $new_instance['limit'] : -1;
 
 		return $instance;
 	}
@@ -138,7 +138,7 @@ public function form( $instance ) {
 			)
 		);
 		$link_cats = get_terms( array( 'taxonomy' => 'link_category' ) );
-		$limit     = intval( $instance['limit'] );
+		$limit     = (int) $instance['limit'];
 		if ( ! $limit ) {
 			$limit = -1;
 		}
@@ -148,7 +148,7 @@ public function form( $instance ) {
 			<select class="widefat" id="<?php echo $this->get_field_id( 'category' ); ?>" name="<?php echo $this->get_field_name( 'category' ); ?>">
 				<option value=""><?php _ex( 'All Links', 'links widget' ); ?></option>
 				<?php foreach ( $link_cats as $link_cat ) : ?>
-					<option value="<?php echo intval( $link_cat->term_id ); ?>" <?php selected( $instance['category'], $link_cat->term_id ); ?>>
+					<option value="<?php echo (int) $link_cat->term_id; ?>" <?php selected( $instance['category'], $link_cat->term_id ); ?>>
 						<?php echo esc_html( $link_cat->name ); ?>
 					</option>
 				<?php endforeach; ?>
@@ -181,7 +181,7 @@ public function form( $instance ) {
 
 		<p>
 			<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of links to show:' ); ?></label>
-			<input id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo ( -1 !== $limit ) ? intval( $limit ) : ''; ?>" size="3" />
+			<input id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo ( -1 !== $limit ) ? (int) $limit : ''; ?>" size="3" />
 		</p>
 		<?php
 	}
diff --git a/src/wp-includes/widgets/class-wp-widget-media.php b/src/wp-includes/widgets/class-wp-widget-media.php
index bb8976a4ea..65c5b3a8ea 100644
--- a/src/wp-includes/widgets/class-wp-widget-media.php
+++ b/src/wp-includes/widgets/class-wp-widget-media.php
@@ -343,7 +343,7 @@ public function update( $new_instance, $instance ) {
 				class="media-widget-instance-property"
 				name="<?php echo esc_attr( $this->get_field_name( $name ) ); ?>"
 				id="<?php echo esc_attr( $this->get_field_id( $name ) ); // Needed specifically by wpWidgets.appendTitle(). ?>"
-				value="<?php echo esc_attr( is_array( $value ) ? join( ',', $value ) : strval( $value ) ); ?>"
+				value="<?php echo esc_attr( is_array( $value ) ? join( ',', $value ) : (string) $value ); ?>"
 			/>
 			<?php
 		endforeach;
diff --git a/src/wp-trackback.php b/src/wp-trackback.php
index 9d798b7167..3d4f6056f5 100644
--- a/src/wp-trackback.php
+++ b/src/wp-trackback.php
@@ -46,7 +46,7 @@ function trackback_response( $error = 0, $error_message = '' ) {
 
 if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) {
 	$tb_id = explode( '/', $_SERVER['REQUEST_URI'] );
-	$tb_id = intval( $tb_id[ count( $tb_id ) - 1 ] );
+	$tb_id = (int) $tb_id[ count( $tb_id ) - 1 ];
 }
 
 $tb_url  = isset( $_POST['url'] ) ? $_POST['url'] : '';
@@ -84,7 +84,7 @@ function trackback_response( $error = 0, $error_message = '' ) {
 	$tb_id = $posts[0]->ID;
 }
 
-if ( ! isset( $tb_id ) || ! intval( $tb_id ) ) {
+if ( ! isset( $tb_id ) || ! (int) $tb_id ) {
 	trackback_response( 1, __( 'I really need an ID for this to work.' ) );
 }
 
diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php
index 285c2d23c3..08b7c0f5d9 100644
--- a/tests/phpunit/includes/utils.php
+++ b/tests/phpunit/includes/utils.php
@@ -299,7 +299,7 @@ function xml_array_dumbdown( &$data ) {
 
 function dmp( ...$args ) {
 	foreach ( $args as $thing ) {
-		echo ( is_scalar( $thing ) ? strval( $thing ) : var_export( $thing, true ) ), "\n";
+		echo ( is_scalar( $thing ) ? (string) $thing : var_export( $thing, true ) ), "\n";
 	}
 }
 
@@ -319,7 +319,7 @@ function gen_tests_array( $name, $array ) {
 	$out = array();
 	foreach ( $array as $k => $v ) {
 		if ( is_numeric( $k ) ) {
-			$index = strval( $k );
+			$index = (string) $k;
 		} else {
 			$index = "'" . addcslashes( $k, "\n\r\t'\\" ) . "'";
 		}
diff --git a/tests/phpunit/tests/comment-submission.php b/tests/phpunit/tests/comment-submission.php
index 88d5a1eae9..715783a3c1 100644
--- a/tests/phpunit/tests/comment-submission.php
+++ b/tests/phpunit/tests/comment-submission.php
@@ -250,7 +250,7 @@ public function test_submitting_valid_comment_as_logged_in_user_succeeds() {
 		$this->assertSame( $user->display_name, $comment->comment_author );
 		$this->assertSame( $user->user_email, $comment->comment_author_email );
 		$this->assertSame( $user->user_url, $comment->comment_author_url );
-		$this->assertSame( $user->ID, intval( $comment->user_id ) );
+		$this->assertSame( $user->ID, (int) $comment->user_id );
 
 	}
 
diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php
index 89ef378436..e7c57ddfa8 100644
--- a/tests/phpunit/tests/customize/manager.php
+++ b/tests/phpunit/tests/customize/manager.php
@@ -2767,7 +2767,7 @@ function test_set_post_value() {
 	 * @return int Value.
 	 */
 	function sanitize_foo_for_test_set_post_value( $value ) {
-		return intval( $value );
+		return (int) $value;
 	}
 
 	/**
diff --git a/tests/phpunit/tests/customize/nav-menus.php b/tests/phpunit/tests/customize/nav-menus.php
index 282988c081..0790b9b3cf 100644
--- a/tests/phpunit/tests/customize/nav-menus.php
+++ b/tests/phpunit/tests/customize/nav-menus.php
@@ -173,8 +173,8 @@ function test_load_available_items_query_returns_post_item_with_page_number() {
 			'type'       => 'post_type',
 			'type_label' => 'Post',
 			'object'     => 'post',
-			'object_id'  => intval( $post_id ),
-			'url'        => get_permalink( intval( $post_id ) ),
+			'object_id'  => (int) $post_id,
+			'url'        => get_permalink( (int) $post_id ),
 		);
 
 		// Offset the query and get the second page of menu items.
@@ -205,8 +205,8 @@ function test_load_available_items_query_returns_page_item() {
 			'type'       => 'post_type',
 			'type_label' => 'Page',
 			'object'     => 'page',
-			'object_id'  => intval( $page_id ),
-			'url'        => get_permalink( intval( $page_id ) ),
+			'object_id'  => (int) $page_id,
+			'url'        => get_permalink( (int) $page_id ),
 		);
 
 		$items = $menus->load_available_items_query( 'post_type', 'page', 0 );
@@ -231,8 +231,8 @@ function test_load_available_items_query_returns_post_item() {
 			'type'       => 'post_type',
 			'type_label' => 'Post',
 			'object'     => 'post',
-			'object_id'  => intval( $post_id ),
-			'url'        => get_permalink( intval( $post_id ) ),
+			'object_id'  => (int) $post_id,
+			'url'        => get_permalink( (int) $post_id ),
 		);
 
 		$items = $menus->load_available_items_query( 'post_type', 'post', 0 );
@@ -257,8 +257,8 @@ function test_load_available_items_query_returns_term_item() {
 			'type'       => 'taxonomy',
 			'type_label' => 'Category',
 			'object'     => 'category',
-			'object_id'  => intval( $term_id ),
-			'url'        => get_term_link( intval( $term_id ), 'category' ),
+			'object_id'  => (int) $term_id,
+			'url'        => get_term_link( (int) $term_id, 'category' ),
 		);
 
 		$items = $menus->load_available_items_query( 'taxonomy', 'category', 0 );
@@ -327,8 +327,8 @@ function test_search_available_items_query() {
 				'type'       => 'post_type',
 				'type_label' => get_post_type_object( 'post' )->labels->singular_name,
 				'object'     => 'post',
-				'object_id'  => intval( $post_id ),
-				'url'        => get_permalink( intval( $post_id ) ),
+				'object_id'  => (int) $post_id,
+				'url'        => get_permalink( (int) $post_id ),
 			);
 			wp_set_object_terms( $post_id, $term_ids, 'category' );
 			$search  = $post_id === $post_ids[0] ? 'test & search' : 'other title';
@@ -351,8 +351,8 @@ function test_search_available_items_query() {
 				'type'       => 'taxonomy',
 				'type_label' => get_taxonomy( 'category' )->labels->singular_name,
 				'object'     => 'category',
-				'object_id'  => intval( $term_id ),
-				'url'        => get_term_link( intval( $term_id ), 'category' ),
+				'object_id'  => (int) $term_id,
+				'url'        => get_term_link( (int) $term_id, 'category' ),
 			);
 			$s        = sanitize_text_field( wp_unslash( $term->name ) );
 			$results  = $menus->search_available_items_query(
@@ -431,8 +431,8 @@ public function test_search_available_items_query_should_return_unassigned_term_
 			'type'       => 'taxonomy',
 			'type_label' => 'Tests Taxonomy',
 			'object'     => 'wptests_tax',
-			'object_id'  => intval( $term_id ),
-			'url'        => get_term_link( intval( $term_id ), '' ),
+			'object_id'  => (int) $term_id,
+			'url'        => get_term_link( (int) $term_id, '' ),
 		);
 
 		$results = $menus->search_available_items_query(
diff --git a/tests/phpunit/tests/customize/partial.php b/tests/phpunit/tests/customize/partial.php
index e73ac56f0b..c7e6126c40 100644
--- a/tests/phpunit/tests/customize/partial.php
+++ b/tests/phpunit/tests/customize/partial.php
@@ -66,7 +66,7 @@ function test_construct_default_args() {
 	 */
 	function render_post_content_partial( $partial ) {
 		$id_data = $partial->id_data();
-		$post_id = intval( $id_data['keys'][0] );
+		$post_id = (int) $id_data['keys'][0];
 		if ( empty( $post_id ) ) {
 			return false;
 		}
diff --git a/tests/phpunit/tests/customize/widgets.php b/tests/phpunit/tests/customize/widgets.php
index 5abaa0f45b..46ab3f81b5 100644
--- a/tests/phpunit/tests/customize/widgets.php
+++ b/tests/phpunit/tests/customize/widgets.php
@@ -482,7 +482,7 @@ function test_call_widget_update() {
 				'id_base'       => 'search',
 				'widget-width'  => '250',
 				'widget-height' => '200',
-				'widget_number' => strval( $widget_number ),
+				'widget_number' => (string) $widget_number,
 				'multi_number'  => '',
 				'add_new'       => '',
 			)
diff --git a/tests/phpunit/tests/image/editorImagick.php b/tests/phpunit/tests/image/editorImagick.php
index a358c654af..5c56aa6011 100644
--- a/tests/phpunit/tests/image/editorImagick.php
+++ b/tests/phpunit/tests/image/editorImagick.php
@@ -558,7 +558,7 @@ public function test_remove_orientation_data_on_rotate() {
 		$data = wp_read_image_metadata( $file );
 
 		// The orientation value 3 is equivalent to rotated upside down (180 degrees).
-		$this->assertSame( 3, intval( $data['orientation'] ), 'Orientation value read from does not match image file Exif data: ' . $file );
+		$this->assertSame( 3, (int) $data['orientation'], 'Orientation value read from does not match image file Exif data: ' . $file );
 
 		$temp_file = wp_tempnam( $file );
 		$image     = wp_get_image_editor( $file );
@@ -570,7 +570,7 @@ public function test_remove_orientation_data_on_rotate() {
 		$data = wp_read_image_metadata( $ret['path'] );
 
 		// Make sure the image is no longer in The Upside Down Exif orientation.
-		$this->assertSame( 1, intval( $data['orientation'] ), 'Orientation Exif data was not updated after rotating image: ' . $file );
+		$this->assertSame( 1, (int) $data['orientation'], 'Orientation Exif data was not updated after rotating image: ' . $file );
 
 		// Remove both the generated file ending in .tmp and tmp.jpg due to wp_tempnam().
 		unlink( $temp_file );
diff --git a/tests/phpunit/tests/option/multisite.php b/tests/phpunit/tests/option/multisite.php
index 49c7197431..f5e0174ca5 100644
--- a/tests/phpunit/tests/option/multisite.php
+++ b/tests/phpunit/tests/option/multisite.php
@@ -120,7 +120,7 @@ function test_with_another_site() {
 			$this->assertTrue( add_blog_option( $blog_id, $key, $value ) );
 			// Assert all values of $blog_id that means the current or main blog (the same here).
 			$this->assertSame( $value, get_blog_option( $blog_id, $key ) );
-			$this->assertSame( $value, get_blog_option( "$blog_id", $key ) );
+			$this->assertSame( $value, get_blog_option( (string) $blog_id, $key ) );
 			// $this->assertSame( $value, get_option( $key ) );                // Check get_option().
 
 			$this->assertFalse( add_blog_option( $blog_id, $key, $value ) );     // Already exists.
diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php
index bacf9b23c5..7fc4313163 100644
--- a/tests/phpunit/tests/post.php
+++ b/tests/phpunit/tests/post.php
@@ -43,7 +43,7 @@ function setUp() {
 	 * Helper function: return the timestamp(s) of cron jobs for the specified hook and post.
 	 */
 	function _next_schedule_for_post( $hook, $id ) {
-		return wp_next_scheduled( 'publish_future_post', array( 0 => intval( $id ) ) );
+		return wp_next_scheduled( 'publish_future_post', array( 0 => (int) $id ) );
 	}
 
 	/**
diff --git a/tests/phpunit/tests/query/results.php b/tests/phpunit/tests/query/results.php
index eb801249ab..e19353a457 100644
--- a/tests/phpunit/tests/query/results.php
+++ b/tests/phpunit/tests/query/results.php
@@ -905,7 +905,7 @@ function test_query_author_vars() {
 
 		$posts      = $this->q->query(
 			array(
-				'author'   => "$author_1",
+				'author'   => (string) $author_1,
 				'post__in' => array( $post_1, $post_2, $post_3, $post_4 ),
 			)
 		);
diff --git a/tests/phpunit/tests/rest-api/rest-posts-controller.php b/tests/phpunit/tests/rest-api/rest-posts-controller.php
index 9831bb0aab..8ce34d4992 100644
--- a/tests/phpunit/tests/rest-api/rest-posts-controller.php
+++ b/tests/phpunit/tests/rest-api/rest-posts-controller.php
@@ -483,7 +483,7 @@ public function test_get_items_exclude_query() {
 		$this->assertTrue( in_array( $id1, $ids, true ) );
 		$this->assertFalse( in_array( $id2, $ids, true ) );
 
-		$request->set_param( 'exclude', "$id2" );
+		$request->set_param( 'exclude', (string) $id2 );
 		$response = rest_get_server()->dispatch( $request );
 		$data     = $response->get_data();
 		$ids      = wp_list_pluck( $data, 'id' );
diff --git a/tests/phpunit/tests/term/getTermLink.php b/tests/phpunit/tests/term/getTermLink.php
index 492a980756..c9e6e2c5a8 100644
--- a/tests/phpunit/tests/term/getTermLink.php
+++ b/tests/phpunit/tests/term/getTermLink.php
@@ -25,7 +25,7 @@ public function test_integer_should_be_interpreted_as_term_id() {
 			)
 		);
 
-		$term = intval( $t1 );
+		$term = (int) $t1;
 
 		$actual = get_term_link( $term, 'wptests_tax' );
 		$this->assertContains( 'wptests_tax=foo', $actual );
diff --git a/tests/phpunit/tests/term/termExists.php b/tests/phpunit/tests/term/termExists.php
index 0cf7d79250..8f39385e40 100644
--- a/tests/phpunit/tests/term/termExists.php
+++ b/tests/phpunit/tests/term/termExists.php
@@ -15,7 +15,7 @@ public function test_term_exists_term_int_taxonomy_nonempty_term_exists() {
 			)
 		);
 
-		$found = term_exists( intval( $t ), 'post_tag' );
+		$found = term_exists( (int) $t, 'post_tag' );
 		$this->assertEquals( $t, $found['term_id'] );
 	}
 
@@ -30,7 +30,7 @@ public function test_term_exists_term_int_taxonomy_nonempty_wrong_taxonomy() {
 			)
 		);
 
-		$this->assertNull( term_exists( intval( $t ), 'foo' ) );
+		$this->assertNull( term_exists( (int) $t, 'foo' ) );
 	}
 
 	public function test_term_exists_term_int_taxonomy_empty_term_exists() {
@@ -40,7 +40,7 @@ public function test_term_exists_term_int_taxonomy_empty_term_exists() {
 			)
 		);
 
-		$found = term_exists( intval( $t ), 'post_tag' );
+		$found = term_exists( (int) $t, 'post_tag' );
 		$this->assertEquals( $t, $found['term_id'] );
 	}
 
diff --git a/tests/phpunit/tests/term/wpDeleteTerm.php b/tests/phpunit/tests/term/wpDeleteTerm.php
index 83855e17cd..92fc2f0ed9 100644
--- a/tests/phpunit/tests/term/wpDeleteTerm.php
+++ b/tests/phpunit/tests/term/wpDeleteTerm.php
@@ -29,7 +29,7 @@ public function test_count_property_passed_to_filters_should_reflect_pre_deleted
 
 		wp_delete_term( $terms[0], 'wptests_tax' );
 		$this->assertSame( 1, $this->deleted_term->count );
-		$this->assertSame( $this->object_ids, array( "$post_id" ) );
+		$this->assertSame( $this->object_ids, array( (string) $post_id ) );
 
 		wp_delete_term( $terms[1], 'wptests_tax' );
 		$this->assertSame( 0, $this->deleted_term->count );
diff --git a/tests/phpunit/tests/term/wpSetObjectTerms.php b/tests/phpunit/tests/term/wpSetObjectTerms.php
index 8984dc940d..774842f1c3 100644
--- a/tests/phpunit/tests/term/wpSetObjectTerms.php
+++ b/tests/phpunit/tests/term/wpSetObjectTerms.php
@@ -145,7 +145,7 @@ function test_set_object_terms_by_name() {
 			// Remember which term has which term_id.
 			for ( $i = 0; $i < 3; $i++ ) {
 				$term                    = get_term_by( 'name', $terms[ $i ], $this->taxonomy );
-				$term_id[ $terms[ $i ] ] = intval( $term->term_id );
+				$term_id[ $terms[ $i ] ] = (int) $term->term_id;
 			}
 		}
 
diff --git a/tests/phpunit/tests/user/wpGetUsersWithNoRole.php b/tests/phpunit/tests/user/wpGetUsersWithNoRole.php
index 46b8bafbdb..69892e0550 100644
--- a/tests/phpunit/tests/user/wpGetUsersWithNoRole.php
+++ b/tests/phpunit/tests/user/wpGetUsersWithNoRole.php
@@ -83,7 +83,7 @@ public function test_get_users_with_no_role_multisite_is_accurate() {
 		$users = wp_get_users_with_no_role();
 		$this->assertSame(
 			array(
-				"{$nobody}",
+				(string) ( $nobody ),
 			),
 			$users
 		);
@@ -99,7 +99,7 @@ public function test_get_users_with_no_role_multisite_is_accurate() {
 		$users = wp_get_users_with_no_role( $blog_1 );
 		$this->assertSame(
 			array(
-				"{$admin}",
+				(string) ( $admin ),
 			),
 			$users
 		);
diff --git a/tests/phpunit/tests/xmlrpc/wp/getPosts.php b/tests/phpunit/tests/xmlrpc/wp/getPosts.php
index 8571969f13..92b54e7870 100644
--- a/tests/phpunit/tests/xmlrpc/wp/getPosts.php
+++ b/tests/phpunit/tests/xmlrpc/wp/getPosts.php
@@ -102,7 +102,7 @@ function test_filters() {
 		$this->assertNotIXRError( $results2 );
 		$last_comment_count = 100;
 		foreach ( $results2 as $post ) {
-			$comment_count = intval( get_comments_number( $post['post_id'] ) );
+			$comment_count = (int) get_comments_number( $post['post_id'] );
 			$this->assertLessThanOrEqual( $last_comment_count, $comment_count );
 			$last_comment_count = $comment_count;
 		}
