function change(string &$x)
{
$x = trim($x);var_dump($x);
}
$v = " bar ";change($v);var_dump($v);
function change(string &$x0 = "", string &$x1 = "", string &$x2 = "")
{
for ($i = 0; $i < func_num_args(); $i++)
{
$s = "x{$i}";$$s = trim($$s);
}
}
$v = " bar ";$w = " foo ";
change($v);var_dump($v, $w);
change($v, $w);var_dump($v, $w);
parse_str("orderNumber=18&amount=450000¤cy=643&language=ru&returnUrl=http%3A%2F%2Fsms.site.ru%2Fpayment%2FSberbank%2Fcallback.php%3Forder%3D18&description=order18+in+site+%D0%92%D0%B5%D0%BB%D0%B8%D0%BA%D0%BE%D0%BB%D0%B5%D0%BF%D0%BD%D1%8B%D0%B9+%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD&orderBundle=%7B%22customerDetails%22%3A%7B%22email%22%3A%22test%40test.ru%22%2C%22phone%22%3A%2279991234567%22%7D%2C%22cartItems%22%3A%7B%22items%22%3A%5B%7B%22positionId%22%3A1%2C%22name%22%3A%22Samsung+S3650+Corby%22%2C%22quantity%22%3A%7B%22value%22%3A%221%22%2C%22measure%22%3A%22%5Cu0448%5Cu0442%22%7D%2C%22itemAmount%22%3A450000%2C%22itemCode%22%3A%2232-0%22%2C%22tax%22%3A%7B%22taxType%22%3A%220%22%7D%2C%22itemPrice%22%3A450000%2C%22itemAttributes%22%3A%7B%22attributes%22%3A%5B%7B%22name%22%3A%22paymentMethod%22%2C%22value%22%3A%221%22%7D%2C%7B%22name%22%3A%22paymentObject%22%2C%22value%22%3A%221%22%7D%5D%7D%7D%5D%7D%2C%22installments%22%3A%7B%22productType%22%3A%22INSTALLMENT%22%2C%22productID%22%3A10%7D%7D&expirationDate=2021-05-28T14%3A05%3A01%2B00%3A00&jsonParams=%7B%22phone%22%3A%22%2B79991234567%22%7D&taxSystem=0&userName=T500000-credit-api&password=T500000-credit", $arr);
$arr['orderBundle'] = json_decode($arr['orderBundle'], true);
var_dump($arr);