3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/\d+(?= Sek)/'; $str = 'aaa ~120 Sek. 53 Sek. ~~ bbb asdfasf aasdf asdfasdf ~600 Sek. ~~ ccc ~60 Sek. 43 Sek. ~~ ddd ~240 Sek. 55 Sek. ~~'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result #print_r($matches); $sum = 0; foreach ($matches as $item) { $sum += $item[0]; } echo $sum;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/iQp0q
function name:  (null)
number of ops:  18
compiled vars:  !0 = $re, !1 = $str, !2 = $matches, !3 = $sum, !4 = $item
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F%5Cd%2B%28%3F%3D+Sek%29%2F'
    4     1        ASSIGN                                                       !1, 'aaa+%7E120+Sek.+53+Sek.+%7E%7E+bbb+asdfasf+aasdf+asdfasdf+%7E600+Sek.+%7E%7E+ccc+%7E60+Sek.+43+Sek.+%7E%7E+ddd+%7E240+Sek.+55+Sek.+%7E%7E'
    6     2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        SEND_VAL                                                     2
          7        SEND_VAL                                                     0
          8        DO_ICALL                                                     
   10     9        ASSIGN                                                       !3, 0
   11    10      > FE_RESET_R                                           $9      !2, ->15
         11    > > FE_FETCH_R                                                   $9, !4, ->15
   12    12    >   FETCH_DIM_R                                          ~10     !4, 0
         13        ASSIGN_OP                                         1          !3, ~10
   11    14      > JMP                                                          ->11
         15    >   FE_FREE                                                      $9
   14    16        ECHO                                                         !3
   15    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.63 ms | 2116 KiB | 14 Q