How can the Mime-Type "text/plain" affect the processing of PHP code in POST requests?

When the Mime-Type "text/plain" is used in POST requests, PHP may not automatically parse the input data into $_POST variables. To solve this issue, you can manually read the input data from the request body and parse it yourself.

// Manually parse input data from request body when Mime-Type is "text/plain"
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_SERVER['CONTENT_TYPE'] === 'text/plain') {
    $inputData = file_get_contents('php://input');
    parse_str($inputData, $_POST);
}