title: Why am I only getting back the first 1000 lines of JSON using AJAX and PHP
body: <p>I'm trying to troubleshoot a project for work (and unfortunately, I can't post the code from said project here). In doing so, I seem to have come across some sort of 'limitation' with the amount of data being returned from a JSON object using an AJAX POST request and PHP to echo back the results. I seem to be only getting the first 1000 lines back, but when I log the object, I get the full 2000 line object.  I'm not sure what I'm doing wrong...</p>
  
  <p>Here is my code:</p>
  
  <p><strong>JS and Ajax request</strong></p>
  
  <pre><code>var payload = {
    "a": {}
  };
  for (i = 0, len = 2000; i &lt; len; i++) {
    payload["a"][i] = {
      "b": "test",
    }; 
  }
  //logs 2000 line object
  console.log(payload);
  
  $.ajax({
      type: "POST",
      url: "test.php",
      dataType: "json",
      data: payload,
      success: function(response) {
        // logs 1000 line object
        console.log(response);
      }
  });
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>header('content-type: application/json');
  
  $post = json_encode($_POST);
  echo $post;
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>