3v4l.org

run code in 300+ PHP versions simultaneously
<?php $minAge = 86400; // 24h $rows = array( 'import_1364893316_foobar', 'import_1364893306_foobar', 'import_1364893216_foobar', 'import_1364892316_foobar', 'import_1364883316_foobar', 'import_1364793316_foobar', 'import_1363893316_foobar', 'import_1354893316_foobar', 'import_1354893416', 'import_1354893316', ); $drops = array(); $maxCreatedAt = true !== $minAge ? time() - $minAge : time() + 1; foreach ($rows as $row) { if (preg_match('/_([0-9]+)[0-9]{6}[_a-zA-Z]*$/', $row, $matches)) { var_dump($matches[1]); if ($maxCreatedAt > (int) $matches[1]) { $drops[] = $row; } } } var_dump($drops);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 34
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 34
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 33
Branch analysis from position: 33
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 34
Branch analysis from position: 16
Branch analysis from position: 34
filename:       /in/r8s8m
function name:  (null)
number of ops:  39
compiled vars:  !0 = $minAge, !1 = $rows, !2 = $drops, !3 = $maxCreatedAt, !4 = $row, !5 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 86400
    5     1        ASSIGN                                                   !1, <array>
   18     2        ASSIGN                                                   !2, <array>
   20     3        TYPE_CHECK                                  1014          !0
          4      > JMPZ                                                     ~9, ->10
   21     5    >   INIT_FCALL                                               'time'
          6        DO_ICALL                                         $10     
          7        SUB                                              ~11     $10, !0
          8        QM_ASSIGN                                        ~12     ~11
          9      > JMP                                                      ->14
   22    10    >   INIT_FCALL                                               'time'
         11        DO_ICALL                                         $13     
         12        ADD                                              ~14     $13, 1
         13        QM_ASSIGN                                        ~12     ~14
   20    14    >   ASSIGN                                                   !3, ~12
   24    15      > FE_RESET_R                                       $16     !1, ->34
         16    > > FE_FETCH_R                                               $16, !4, ->34
   25    17    >   INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2F_%28%5B0-9%5D%2B%29%5B0-9%5D%7B6%7D%5B_a-zA-Z%5D%2A%24%2F'
         19        SEND_VAR                                                 !4
         20        SEND_REF                                                 !5
         21        DO_ICALL                                         $17     
         22      > JMPZ                                                     $17, ->33
   26    23    >   INIT_FCALL                                               'var_dump'
         24        FETCH_DIM_R                                      ~18     !5, 1
         25        SEND_VAL                                                 ~18
         26        DO_ICALL                                                 
   27    27        FETCH_DIM_R                                      ~20     !5, 1
         28        CAST                                          4  ~21     ~20
         29        IS_SMALLER                                               ~21, !3
         30      > JMPZ                                                     ~22, ->33
   28    31    >   ASSIGN_DIM                                               !2
         32        OP_DATA                                                  !4
   24    33    > > JMP                                                      ->16
         34    >   FE_FREE                                                  $16
   33    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.41 ms | 1400 KiB | 19 Q