3v4l.org

run code in 300+ PHP versions simultaneously
<?php $minAge = 86400; // 24h list ($usec, $sec) = explode(' ', microtime(false)); $name = sprintf('%d%06d', $sec, $usec * 1000000); var_dump($name, time()); $rows = array( 'import_1364895119900672_foobar', 'import_1364895119900672', ); $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 = 30, Position 2 = 35
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 77) Position 1 = 41, Position 2 = 59
Branch analysis from position: 41
2 jumps found. (Code = 78) Position 1 = 42, Position 2 = 59
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 58
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 58
Branch analysis from position: 58
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
Branch analysis from position: 35
2 jumps found. (Code = 77) Position 1 = 41, Position 2 = 59
Branch analysis from position: 41
Branch analysis from position: 59
filename:       /in/G8CVX
function name:  (null)
number of ops:  64
compiled vars:  !0 = $minAge, !1 = $usec, !2 = $sec, !3 = $name, !4 = $rows, !5 = $drops, !6 = $maxCreatedAt, !7 = $row, !8 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 86400
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <false>
          5        DO_ICALL                                         $10     
          6        SEND_VAR                                                 $10
          7        DO_ICALL                                         $11     
          8        FETCH_LIST_R                                     $12     $11, 0
          9        ASSIGN                                                   !1, $12
         10        FETCH_LIST_R                                     $14     $11, 1
         11        ASSIGN                                                   !2, $14
         12        FREE                                                     $11
    6    13        INIT_FCALL                                               'sprintf'
         14        SEND_VAL                                                 '%25d%2506d'
         15        SEND_VAR                                                 !2
         16        MUL                                              ~16     !1, 1000000
         17        SEND_VAL                                                 ~16
         18        DO_ICALL                                         $17     
         19        ASSIGN                                                   !3, $17
    8    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !3
         22        INIT_FCALL                                               'time'
         23        DO_ICALL                                         $19     
         24        SEND_VAR                                                 $19
         25        DO_ICALL                                                 
   11    26        ASSIGN                                                   !4, <array>
   16    27        ASSIGN                                                   !5, <array>
   18    28        TYPE_CHECK                                  1014          !0
         29      > JMPZ                                                     ~23, ->35
   19    30    >   INIT_FCALL                                               'time'
         31        DO_ICALL                                         $24     
         32        SUB                                              ~25     $24, !0
         33        QM_ASSIGN                                        ~26     ~25
         34      > JMP                                                      ->39
   20    35    >   INIT_FCALL                                               'time'
         36        DO_ICALL                                         $27     
         37        ADD                                              ~28     $27, 1
         38        QM_ASSIGN                                        ~26     ~28
   18    39    >   ASSIGN                                                   !6, ~26
   22    40      > FE_RESET_R                                       $30     !4, ->59
         41    > > FE_FETCH_R                                               $30, !7, ->59
   23    42    >   INIT_FCALL                                               'preg_match'
         43        SEND_VAL                                                 '%2F_%28%5B0-9%5D%2B%29%5B0-9%5D%7B6%7D%5B_a-zA-Z%5D%2A%24%2F'
         44        SEND_VAR                                                 !7
         45        SEND_REF                                                 !8
         46        DO_ICALL                                         $31     
         47      > JMPZ                                                     $31, ->58
   24    48    >   INIT_FCALL                                               'var_dump'
         49        FETCH_DIM_R                                      ~32     !8, 1
         50        SEND_VAL                                                 ~32
         51        DO_ICALL                                                 
   25    52        FETCH_DIM_R                                      ~34     !8, 1
         53        CAST                                          4  ~35     ~34
         54        IS_SMALLER                                               ~35, !6
         55      > JMPZ                                                     ~36, ->58
   26    56    >   ASSIGN_DIM                                               !5
         57        OP_DATA                                                  !7
   22    58    > > JMP                                                      ->41
         59    >   FE_FREE                                                  $30
   31    60        INIT_FCALL                                               'var_dump'
         61        SEND_VAR                                                 !5
         62        DO_ICALL                                                 
         63      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.69 ms | 1400 KiB | 25 Q