3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "'id_konversi_aktivitas' => 'f4d\'943e7', 'nim' => '180218038'"; preg_match_all("~'(.+?)' *=> *'(.+?)'(,|$)~",$string,$match); $array = array_combine($match[1],$match[2]); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YO8Q
function name:  (null)
number of ops:  17
compiled vars:  !0 = $string, !1 = $match, !2 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%27id_konversi_aktivitas%27+%3D%3E+%27f4d%5C%27943e7%27%2C+%27nim%27+%3D%3E+%27180218038%27'
    5     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%7E%27%28.%2B%3F%29%27+%2A%3D%3E+%2A%27%28.%2B%3F%29%27%28%2C%7C%24%29%7E'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    7     6        INIT_FCALL                                                   'array_combine'
          7        FETCH_DIM_R                                          ~5      !1, 1
          8        SEND_VAL                                                     ~5
          9        FETCH_DIM_R                                          ~6      !1, 2
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                             $7      
         12        ASSIGN                                                       !2, $7
    9    13        INIT_FCALL                                                   'var_dump'
         14        SEND_VAR                                                     !2
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.93 ms | 1935 KiB | 16 Q