3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = ["00:00:00", "00:00:02", "00:00:30", "00:02:30", "00:20:00", "01:02:30", "10:20:03"]; foreach ($arr as $time) { preg_match('/([1-9].*|.{4}$)/', $time, $matches); echo $time." -> ".$matches[1]."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/eC8BQ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $time, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   11     1      > FE_RESET_R                                           $4      !0, ->14
          2    > > FE_FETCH_R                                                   $4, !1, ->14
   12     3    >   INIT_FCALL                                                   'preg_match'
          4        SEND_VAL                                                     '%2F%28%5B1-9%5D.%2A%7C.%7B4%7D%24%29%2F'
          5        SEND_VAR                                                     !1
          6        SEND_REF                                                     !2
          7        DO_ICALL                                                     
   13     8        CONCAT                                               ~6      !1, '+-%3E+'
          9        FETCH_DIM_R                                          ~7      !2, 1
         10        CONCAT                                               ~8      ~6, ~7
         11        CONCAT                                               ~9      ~8, '%0A'
         12        ECHO                                                         ~9
   11    13      > JMP                                                          ->2
         14    >   FE_FREE                                                      $4
   14    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.48 ms | 478 KiB | 8 Q