I was working in php java bridge and came across this problem.
The below is the code
$payID = $epaymentpipe->getPaymentId();
echo $payID;
the expected value is printed e.g., 5323423123
but when i pass the same variable in header like below, the object id is passing in payID.
header("location: URL?PaymentID=".$payID);
it is passing like http://URL?PaymentID=Object id #53
I Need to know whats happening here. When the variable is echoed its printing correctly but when i use the variable the object id is passing.
Use
and report this bug to the PHP developers.
The . operator should convert its arguments to a string using $object->__toString().
Note that this has been fixed in PHP 5.3 and above!