3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tests = [ 'file_name_here1.txt', 'some_other-file10.txt', 'file_name_1__123.txt', 'this_file_name_2__456.txt', ]; foreach ($tests as $test) { preg_match('/(.+?)(\d+)\.\w+$/', $test, $m); var_dump(array_slice($m, 1)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/tuf0l
function name:  (null)
number of ops:  18
compiled vars:  !0 = $tests, !1 = $test, !2 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1      > FE_RESET_R                                           $4      !0, ->16
          2    > > FE_FETCH_R                                                   $4, !1, ->16
   11     3    >   INIT_FCALL                                                   'preg_match'
          4        SEND_VAL                                                     '%2F%28.%2B%3F%29%28%5Cd%2B%29%5C.%5Cw%2B%24%2F'
          5        SEND_VAR                                                     !1
          6        SEND_REF                                                     !2
          7        DO_ICALL                                                     
   12     8        INIT_FCALL                                                   'var_dump'
          9        INIT_FCALL                                                   'array_slice'
         10        SEND_VAR                                                     !2
         11        SEND_VAL                                                     1
         12        DO_ICALL                                             $6      
         13        SEND_VAR                                                     $6
         14        DO_ICALL                                                     
   10    15      > JMP                                                          ->2
         16    >   FE_FREE                                                      $4
   13    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.77 ms | 1659 KiB | 16 Q