3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Response: string TRANSACTION_ID=abc123 MERCHANT_ACC_NO=M213213 TXN_STATUS=A TRAN_DATE=2020-07-20 CAPTURE_DATE=2020-07-20 SALES_DATE=2020-07-20 RESPONSE_CODE=1 RESPONSE_MESSAGE=Success'; foreach(explode("\n", $str) as $line){ $temp = explode("=", str_replace(["=",": "], "=", $line)); $res[$temp[0]] = $temp[1]; } var_dump($res);
Output for git.master, git.master_jit, rfc.property-hooks
array(9) { ["Response"]=> string(6) "string" ["TRANSACTION_ID"]=> string(6) "abc123" ["MERCHANT_ACC_NO"]=> string(7) "M213213" ["TXN_STATUS"]=> string(1) "A" ["TRAN_DATE"]=> string(10) "2020-07-20" ["CAPTURE_DATE"]=> string(10) "2020-07-20" ["SALES_DATE"]=> string(11) "2020-07-20 " ["RESPONSE_CODE"]=> string(1) "1" ["RESPONSE_MESSAGE"]=> string(7) "Success" }

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:
115.09 ms | 406 KiB | 5 Q