3v4l.org

run code in 300+ PHP versions simultaneously
<?php $jsonString = '[{"salesid":130201411173700750}]'; // PHP code $payments = json_decode(stripslashes(html_entity_decode(rtrim($jsonString, '\0'))), true); $values = ''; foreach ($payments as $key => $value) { $value = (object)$value; if ($values != '') { $values .= ','; } printResponse(false, "sales id: $value->salesid"); exit; //more code omitted... } function printResponse($success, $data, $totalCount = 0) { header('Content-Type: application/json;charset=UTF-8'); print json_encode((object)[ 'success' => $success, 'data' => $data, 'totalCount' => $totalCount ]); exit; }
Output for git.master_jit, git.master, rfc.property-hooks
{"success":false,"data":"sales id: 130201411173700750","totalCount":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:
26.3 ms | 405 KiB | 5 Q