3v4l.org

run code in 300+ PHP versions simultaneously
<?php $duty = array(); $duty['quantity'] = 1; $duty['sku'] = '20-76-01-0040-000-000'; $duty['name'] = 'Duties'; $duty['price'] = array( "amountExcludingTax" => 12.99, "amountIncludingTax" => 12.99, "tax" => 0 ); $data['rows'][] = $duty; $service = array(); $service['quantity'] = 1; $service['sku'] = '20-76-01-0050-000-000'; $service['name'] = 'Service Fees'; $service['price'] = array( "amountExcludingTax" => 20.50, "amountIncludingTax" => 20.50, "tax" => 0 ); $data['rows'][] = $service; echo json_encode($data);
Output for git.master, git.master_jit, rfc.property-hooks
{"rows":[{"quantity":1,"sku":"20-76-01-0040-000-000","name":"Duties","price":{"amountExcludingTax":12.99,"amountIncludingTax":12.99,"tax":0}},{"quantity":1,"sku":"20-76-01-0050-000-000","name":"Service Fees","price":{"amountExcludingTax":20.5,"amountIncludingTax":20.5,"tax":0}}]}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.24 ms | 401 KiB | 8 Q