3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'Files("textfile1.txt", 7268474425, "textfile2.txt", 661204928, "textfile3.txt", 121034)'; $result = []; preg_match_all('/(?:^\w+\(|\G, )"([^"]+)", (\d+)/', $string, $matches, PREG_SET_ORDER); foreach ($matches as [1 => $key, 2 => $val]) { $result[$key] = (int) $val; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/AI12V
function name:  (null)
number of ops:  24
compiled vars:  !0 = $string, !1 = $result, !2 = $matches, !3 = $key, !4 = $val
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                                                   'preg_match_all'
          3        SEND_VAL                                                     '%2F%28%3F%3A%5E%5Cw%2B%5C%28%7C%5CG%2C+%29%22%28%5B%5E%22%5D%2B%29%22%2C+%28%5Cd%2B%29%2F'
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !2
          6        SEND_VAL                                                     2
          7        DO_ICALL                                                     
    7     8      > FE_RESET_R                                           $8      !2, ->19
          9    > > FE_FETCH_R                                                   $8, $9, ->19
         10    >   FETCH_LIST_R                                         $10     $9, 1
         11        ASSIGN                                                       !3, $10
         12        FETCH_LIST_R                                         $12     $9, 2
         13        ASSIGN                                                       !4, $12
         14        FREE                                                         $9
    8    15        CAST                                              4  ~15     !4
         16        ASSIGN_DIM                                                   !1, !3
         17        OP_DATA                                                      ~15
    7    18      > JMP                                                          ->9
         19    >   FE_FREE                                                      $8
   10    20        INIT_FCALL                                                   'var_export'
         21        SEND_VAR                                                     !1
         22        DO_ICALL                                                     
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.99 ms | 1892 KiB | 15 Q