title: var_dump() of strings and variables not showing desired results
body: <p>I am working on a script that curls another site and then parses the results. I seem to be having some weird problems and I can't understand where they are coming from; I have included the problematic part of my code as well as the output that is returned from it below:</p>
  
  <pre><code>&lt;?php
      //my code to do some logic and build the curl
  
      $BookingConfirmation = curl_exec($ch);
  
      $testString = 'a test';
      var_dump($testString);
      echo '&lt;br /&gt;';
      echo $BookingConfirmation;
      echo '&lt;br /&gt;';
      var_dump($BookingConfirmation);
      echo '&lt;br /&gt;';
  
      $bookingResults = explode('|', $BookingConfirmation);
  
      var_dump($bookingResults);
      die();
  ?&gt;
  </code></pre>
  
  <p>when I then load the page, I am getting this output:</p>
  
  <pre><code>string(6) "a test"
  booking|1||4000015|23628
  string(2386) " booking|1||4000015|23628 "
  array(6) { 
      [0]=&gt; string(766) " string(1526) "108^1"&gt; booking" 
      [2]=&gt; string(1) "1" 
      [3]=&gt;     string(0) "" 
      [4]=&gt; string(7) "4000015" 
      [5]=&gt; string(81) "23628 " 
  } 
  </code></pre>
  
  <p>So according to what $BookingConfirmation is showing me, I wouldn't expect the array to contain "108^1" anywhere within it. Also, why would the var_dump of $BookingConfirmation be showing that it is a 2386 character string? It is nowhere near that long. Another question is, what is happening with the second element that should be in the array? ($bookingResults[1]) The final dump of that array is showing that there are 6 elements, but with #1 being skipped there are only 5 being shown.</p>
  
  <p>It also might be useful to note that none of these variable names are used anywhere else in the code.</p>
  
  <p>Any thoughts would be greatly appreciated.</p>