diff --git src/wp-includes/pluggable.php src/wp-includes/pluggable.php
index 4edb9929f6..a06bcdcadc 100644
--- src/wp-includes/pluggable.php
+++ src/wp-includes/pluggable.php
@@ -568,6 +568,7 @@ if ( ! function_exists( 'wp_logout' ) ) :
 	function wp_logout() {
 		wp_destroy_current_session();
 		wp_clear_auth_cookie();
+		wp_set_current_user( 0 );
 
 		/**
 		 * Fires after a user is logged-out.
diff --git tests/phpunit/tests/pluggable.php tests/phpunit/tests/pluggable.php
index e711f3b8bc..aeb96936a8 100644
--- tests/phpunit/tests/pluggable.php
+++ tests/phpunit/tests/pluggable.php
@@ -319,4 +319,19 @@ class Tests_Pluggable extends WP_UnitTestCase {
 		return $signatures;
 	}
 
+	/**
+	 * @ticket 35488
+	 */
+	function testWpLogoutShouldSetCurrentUserIdToZero() {
+
+		$user_id = self::factory()->user->create();
+
+		wp_set_current_user( $user_id );
+
+		wp_logout();
+
+		$this->assertEquals( 0, get_current_user_id() );
+
+	}
+
 }
