3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "txn_status=0|txn_msg=success|txn_err_msg=NA|clnt_txn_ref=969239|tpsl_bank_cd=470|tpsl_txn_id=192630337|txn_amt=1.00|clnt_rqst_meta={itc:NIC~TXN0001~122333~rt14154~8 mar 2014~Payment~forpayment}{custname:test}|tpsl_txn_time=26-12-2015 15:56:20|tpsl_rfnd_id=NA|bal_amt=NA|rqst_token=hdfs-df-jkfhskjfhsjkd|hash=jhdsfs54367jhf"; $arr = explode('|',$string); $final_array = array_map(function($v){ $a = explode("=",$v); return array($a[0] => $a[1]);},$arr); print_r($final_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XMXd7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $arr, !2 = $final_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'txn_status%3D0%7Ctxn_msg%3Dsuccess%7Ctxn_err_msg%3DNA%7Cclnt_txn_ref%3D969239%7Ctpsl_bank_cd%3D470%7Ctpsl_txn_id%3D192630337%7Ctxn_amt%3D1.00%7Cclnt_rqst_meta%3D%7Bitc%3ANIC%7ETXN0001%7E122333%7Ert14154%7E8+mar+2014%7EPayment%7Eforpayment%7D%7Bcustname%3Atest%7D%7Ctpsl_txn_time%3D26-12-2015+15%3A56%3A20%7Ctpsl_rfnd_id%3DNA%7Cbal_amt%3DNA%7Crqst_token%3Dhdfs-df-jkfhskjfhsjkd%7Chash%3Djhdsfs54367jhf'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXMXd7%3A5%240'
          8        SEND_VAL                                                 ~6
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FXMXd7%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XMXd7
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $v, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3D'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
          6        FETCH_DIM_R                                      ~4      !1, 0
          7        FETCH_DIM_R                                      ~5      !1, 1
          8        INIT_ARRAY                                       ~6      ~5, ~4
          9      > RETURN                                                   ~6
         10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FXMXd7%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.08 ms | 1396 KiB | 19 Q