3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('REST_URL', 'https://api.nizex.com/submitorder'); //Defines the url and function to be called. define('API_KEY', 'my-api-key'); //API Key from Lizzy $orders = array("Orders" => array(0 => array( "OrderNumber" => "825713", //Order number from the web store "Date" => "2013-02-12", //Date the order was created "Time" => "15:28", //Time the order was created "InvoiceNumber" => "", //Invoice number from the web store, "" if not applicable "Tax" => 1.99, //Tax amount (Format 0.00) "ShippingCost" => 5.99, //Shipping cost (Format 0.00) "Total" => 28.83, //Total cost of the order (Format 0.00) "PaymentMethod" => "Visa", //Payment method used by customer. "ShippingAddress" => array( "FirstName" => "Noel", //Ship to first name "LastName" => "Jacques", //Ship to last name "EmailAddress" => "njacques@nizex.com", //Ship to email address "CompanyName" => "Nizex Inc.", //Ship to company name "Phone" => "6783594184", //Ship to phone number "Address" => "1735 Pennsylvania Ave.", //Ship to address "Address2" => "", //Ship to address 2 "City" => "McDonough", //Ship to city "State" => "GA", //Ship to state (two letter abbreviation only) "ZipCode" => "30353", //Ship to zip code "Country" => "US", //Ship to county (two letter abbreviation only) "Method" => "Priority Mail" //Shipping method (ex. FedEx Next Day, etc...) ), "BillingAddress" => array( "FirstName" => "Noel", //Bill to first name "LastName" => "Jacques", //Bill to last name "EmailAddress" => "njacques@nizex.com", //Bill to email address "CompanyName" => "Nizex Inc.", //Bill to company name "Phone" => "6783594184", //Bill to phone number "Address" => "1735 Pennsylvania Ave.", //Bill to address "Address2" => "", //Bill to address 2 "City" => "McDonough", //Bill to city "State" => "GA", //Bill to state (two letter abbreviation only) "ZipCode" => "30353", //Bill to zip code "Country" => "US", //Bill to county (two letter abbreviation only) ), "OrderItems" => array( 0 => array( "ProductID" => "01-0013", //Product part number "ProductCode" => "PUN", //Product brand code "ProductDesc" => "Oil Filter, Kawasaki", //Product description "Price" => "6.95", //Price presented to customer (Format 0.00) "Quantity" => "2", //Quantity ordered "DropShip" => "True" //Flag item as a drop ship item. ), 1 => array( "ProductID" => "01-0021", //Product part number "ProductCode" => "PUN", //Product brand code "ProductDesc" => "Oil Filter, Honda", //Product description "Price" => "6.95", //Price presented to customer (Format 0.00) "Quantity" => "1" //Quantity ordered ))))); $orders = json_encode($orders); //Setup the curl request $qrystr = "&APIKey=".API_KEY."&Payload=$orders"; echo $qrystr;

preferences:
42.3 ms | 402 KiB | 5 Q