WordPress at a glance
function is not described

WP_Query::set_404() WP 2.0.0

Sets the 404 property and saves whether query is feed.

This is a method of the class: WP_Query

No Hooks.

Return

Nothing (null).

Usage

$WP_Query = new WP_Query();
$var = $WP_Query->set_404();

Code of WP Query::set 404: wp-includes/class-wp-query.php WP 5.2

<?php
public function set_404() {
	$is_feed = $this->is_feed;

	$this->init_query_flags();
	$this->is_404 = true;

	$this->is_feed = $is_feed;
}