1--TEST--
2request_parse_body() max_multipart_body_parts option
3--INI--
4max_multipart_body_parts=10
5--ENV--
6REQUEST_METHOD=PUT
7--POST_RAW--
8Content-Type: multipart/form-data; boundary=---------------------------84000087610663814162942123332
9-----------------------------84000087610663814162942123332
10Content-Disposition: form-data; name="post_field_name"
11
12post field data
13-----------------------------84000087610663814162942123332
14Content-Disposition: form-data; name="file_name"; filename="original_file_name.txt"
15Content-Type: text/plain
16
17file data
18-----------------------------84000087610663814162942123332--
19--FILE--
20<?php
21
22try {
23    [$_POST, $_FILES] = request_parse_body([
24        'max_multipart_body_parts' => 1,
25    ]);
26} catch (Throwable $e) {
27    echo get_class($e), ': ', $e->getMessage(), "\n";
28}
29
30var_dump($_POST, $_FILES);
31
32?>
33--EXPECT--
34RequestParseBodyException: Multipart body parts limit exceeded 1. To increase the limit change max_multipart_body_parts in php.ini.
35array(0) {
36}
37array(0) {
38}
39