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"; $final_array = call_user_function_array('array_merge',array_map(function($v){ $a = explode("=",$v); return array($a[0] => $a[1]);},explode('|',$string))); print_r($final_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qll7C
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $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_BY_NAME                                       'call_user_function_array'
          2        SEND_VAL_EX                                              'array_merge'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fqll7C%3A4%240'
          5        SEND_VAL                                                 ~3
          6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '%7C'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        SEND_VAR_NO_REF_EX                                       $5
         13        DO_FCALL                                      0  $6      
         14        ASSIGN                                                   !1, $6
    5    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fqll7C%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qll7C
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $v, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     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%2Fqll7C%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.42 ms | 1388 KiB | 19 Q