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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/evdMO
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str, !1 = $line, !2 = $temp, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Response%3A+string%0ATRANSACTION_ID%3Dabc123%0AMERCHANT_ACC_NO%3DM213213%0ATXN_STATUS%3DA%0ATRAN_DATE%3D2020-07-20%0ACAPTURE_DATE%3D2020-07-20%0ASALES_DATE%3D2020-07-20+%0ARESPONSE_CODE%3D1%0ARESPONSE_MESSAGE%3DSuccess'
   13     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5      > FE_RESET_R                                       $6      $5, ->22
          6    > > FE_FETCH_R                                               $6, !1, ->22
   14     7    >   INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%3D'
          9        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 <array>
         11        SEND_VAL                                                 '%3D'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
   15    17        FETCH_DIM_R                                      ~10     !2, 0
         18        FETCH_DIM_R                                      ~12     !2, 1
         19        ASSIGN_DIM                                               !3, ~10
         20        OP_DATA                                                  ~12
   13    21      > JMP                                                      ->6
         22    >   FE_FREE                                                  $6
   17    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.33 ms | 1003 KiB | 16 Q