3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=['cses_id'=>'54','ccc_id'=>'1157','csh_id'=>'206','css_id'=>'441,442','sai_id'=>'12213']; $stop=false; while(!$stop){ $stop=true; $temp=[]; foreach($array as $key=>&$val){ $parts=explode(',',$val,2); $temp[$key]=$parts[0]; if(sizeof($parts)>1){ $stop=false; $val=$parts[1]; } } $result[]=$temp; } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 3
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 125) Position 1 = 6, Position 2 = 24
Branch analysis from position: 6
2 jumps found. (Code = 126) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 23
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 3
Branch analysis from position: 29
Branch analysis from position: 3
Branch analysis from position: 24
filename:       /in/2YDPI
function name:  (null)
number of ops:  33
compiled vars:  !0 = $array, !1 = $stop, !2 = $temp, !3 = $val, !4 = $key, !5 = $parts, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <false>
    5     2      > JMP                                                      ->27
    6     3    >   ASSIGN                                                   !1, <true>
    7     4        ASSIGN                                                   !2, <array>
    8     5      > FE_RESET_RW                                      $11     !0, ->24
          6    > > FE_FETCH_RW                                      ~12     $11, !3, ->24
          7    >   ASSIGN                                                   !4, ~12
    9     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !3
         11        SEND_VAL                                                 2
         12        DO_ICALL                                         $14     
         13        ASSIGN                                                   !5, $14
   10    14        FETCH_DIM_R                                      ~17     !5, 0
         15        ASSIGN_DIM                                               !2, !4
         16        OP_DATA                                                  ~17
   11    17        COUNT                                            ~18     !5
         18        IS_SMALLER                                               1, ~18
         19      > JMPZ                                                     ~19, ->23
   12    20    >   ASSIGN                                                   !1, <false>
   13    21        FETCH_DIM_R                                      ~21     !5, 1
         22        ASSIGN                                                   !3, ~21
    8    23    > > JMP                                                      ->6
         24    >   FE_FREE                                                  $11
   16    25        ASSIGN_DIM                                               !6
         26        OP_DATA                                                  !2
    5    27    >   BOOL_NOT                                         ~24     !1
         28      > JMPNZ                                                    ~24, ->3
   18    29    >   INIT_FCALL                                               'var_export'
         30        SEND_VAR                                                 !6
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.2 ms | 1007 KiB | 15 Q