Either use view-source, text/plain content-type, or run it through command line.
<?php
header("Content-Type: text/plain; charset=utf-8");
//my code to do some logic and build the curl
$BookingConfirmation = curl_exec($ch);
$testString = 'a test';
var_dump($testString);
echo '<br />';
echo $BookingConfirmation;
echo '<br />';
var_dump($BookingConfirmation);
echo '<br />';
$bookingResults = explode('|', $BookingConfirmation);
var_dump($bookingResults);
die();
?>
I suspect the input contained <
, which is rendered as some hidden html tag. I mean,string(2386) " booking|1||4000015|23628 "
, means the string has 2386
bytes.