$orderRequest = new CreateOrderRequest(null, "BTC", null, $currency, $amount, $orderDescription, "en", $callbackUrl, $successUrl, $cancelUrl);
我需要打印:$orderRequest
我这样做:
exit("orderRequest: {$currency} {$amount}; {$orderDescription}; {$callbackUrl}; {$successUrl}; {$cancelUrl}");
也许有更简单的方法可以做到这一点?
答案 0 :(得分:2)
这是一种简化方法:
echo '<pre>'; // easy way to improve print_r layout (newlines)
print_r($orderRequest); // can print objects and arrays, while exit() doesn't
exit(); // optional, depending if you want to terminate program execution
此外,仅当您在{$currency}
echo "{$currency['key']}";
之类的大括号