3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2=OK, 3=OK" ; $array = explode(',',$string); $finalArray = array(); foreach($array as $arr){ $explodedString = explode('=',trim($arr)); $finalArray[$explodedString[0]] = $explodedString[1]; } print_r($finalArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/ZsNY8
function name:  (null)
number of ops:  27
compiled vars:  !0 = $string, !1 = $array, !2 = $finalArray, !3 = $arr, !4 = $explodedString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2%3DOK%2C+3%3DOK'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    7     6        ASSIGN                                                   !2, <array>
    8     7      > FE_RESET_R                                       $9      !1, ->22
          8    > > FE_FETCH_R                                               $9, !3, ->22
    9     9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%3D'
         11        INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !4, $11
   10    17        FETCH_DIM_R                                      ~13     !4, 0
         18        FETCH_DIM_R                                      ~15     !4, 1
         19        ASSIGN_DIM                                               !2, ~13
         20        OP_DATA                                                  ~15
    8    21      > JMP                                                      ->8
         22    >   FE_FREE                                                  $9
   12    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
249.06 ms | 1002 KiB | 16 Q