fork(1) download
  1. <?php
  2.  
  3. $str = '{"products":[{"product":{"title":"Product1","id":"82cbf74569427f33b97d3ffcebba9bab","formatted_price":"10.00","price":"10.00","image":"","url":"\/product1"},"quantity":"1"}],"data":{"firstname":"ffd","lastname":"dffdf","email":"3@gfgf.com","address":"\u0432\u0430\u043f\u0432\u0430\u043f\u0432","shipping_method":"All countries","payment_method":"paypal_express"},"shipping":{"method":"All countries","cost":"0.00"},"payment":"paypal","amount":"10.00","taxes":"0.00","token":"OnUIIJiNxd","gateway":"paypal_express"}';
  4.  
  5. var_dump(json_decode($str, true));
Success #stdin #stdout 0.01s 23772KB
stdin
Standard input is empty
stdout
array(8) {
  ["products"]=>
  array(1) {
    [0]=>
    array(2) {
      ["product"]=>
      array(6) {
        ["title"]=>
        string(8) "Product1"
        ["id"]=>
        string(32) "82cbf74569427f33b97d3ffcebba9bab"
        ["formatted_price"]=>
        string(5) "10.00"
        ["price"]=>
        string(5) "10.00"
        ["image"]=>
        string(0) ""
        ["url"]=>
        string(9) "/product1"
      }
      ["quantity"]=>
      string(1) "1"
    }
  }
  ["data"]=>
  array(6) {
    ["firstname"]=>
    string(3) "ffd"
    ["lastname"]=>
    string(5) "dffdf"
    ["email"]=>
    string(10) "3@gfgf.com"
    ["address"]=>
    string(14) "вапвапв"
    ["shipping_method"]=>
    string(13) "All countries"
    ["payment_method"]=>
    string(14) "paypal_express"
  }
  ["shipping"]=>
  array(2) {
    ["method"]=>
    string(13) "All countries"
    ["cost"]=>
    string(4) "0.00"
  }
  ["payment"]=>
  string(6) "paypal"
  ["amount"]=>
  string(5) "10.00"
  ["taxes"]=>
  string(4) "0.00"
  ["token"]=>
  string(10) "OnUIIJiNxd"
  ["gateway"]=>
  string(14) "paypal_express"
}