3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'Files("textfile1.txt", 7268474425, "textfile2.txt", 661204928, "textfile3.txt", 121034)'; $result = []; foreach (explode(', ', substr($string, 6, -1)) as $val) { if (!isset($key)) { $key = trim($val, '"'); } else { $result[$key] = (int) $val; unset($key); } } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/6KgB5
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $result, !2 = $val, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Files%28%22textfile1.txt%22%2C+7268474425%2C+%22textfile2.txt%22%2C+661204928%2C+%22textfile3.txt%22%2C+121034%29'
    5     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '%2C+'
          4        FRAMELESS_ICALL_3                substr              ~6      !0, 6
          5        OP_DATA                                                      -1
          6        SEND_VAL                                                     ~6
          7        DO_ICALL                                             $7      
          8      > FE_RESET_R                                           $8      $7, ->21
          9    > > FE_FETCH_R                                                   $8, !2, ->21
    7    10    >   ISSET_ISEMPTY_CV                                     ~9      !3
         11        BOOL_NOT                                             ~10     ~9
         12      > JMPZ                                                         ~10, ->16
    8    13    >   FRAMELESS_ICALL_2                trim                ~11     !2, '%22'
         14        ASSIGN                                                       !3, ~11
    7    15      > JMP                                                          ->20
   10    16    >   CAST                                              4  ~14     !2
         17        ASSIGN_DIM                                                   !1, !3
         18        OP_DATA                                                      ~14
   11    19        UNSET_CV                                                     !3
    6    20    > > JMP                                                          ->9
         21    >   FE_FREE                                                      $8
   14    22        INIT_FCALL                                                   'var_export'
         23        SEND_VAR                                                     !1
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.85 ms | 1893 KiB | 15 Q