3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cutlist=explode("\n", 'FILE PROCESSING COMPLETE 99042 FRAMES AT 2500 ------------------- 27475 32467 52725 58360 86124 89494 96382 99042'); #Markssql will hold the lines of SQL to insert in to the DB. $marks=array(); #Go through each line foreach ($cutlist as $aline) { #And match "One or more digit followed by one or more space/tab folowed by one or more digits again" #ie. Look for two columns of numbers - get those numbers. preg_match_all('/^([0-9]+)\s+([0-9]+)/',$aline,$result); #if there numbers make sense, create some SQL to insert the record in to the database if(!empty($result[1])) { if (($result[1][0]>0)&&($result[2][0])>1) { $marks[$result[1][0]]=MARK_COMM_START; $marks[$result[2][0]]=MARK_COMM_END; } } } var_dump($marks);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 36
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 36
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 35
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 35
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 35
Branch analysis from position: 24
Branch analysis from position: 35
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/DdMC2
function name:  (null)
number of ops:  41
compiled vars:  !0 = $cutlist, !1 = $marks, !2 = $aline, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%0A'
          2        SEND_VAL                                                 'FILE+PROCESSING+COMPLETE++99042+FRAMES+AT++2500%0A-------------------%0A27475%0932467%0A52725%0958360%0A86124%0989494%0A96382%0999042'
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
   11     5        ASSIGN                                                   !1, <array>
   14     6      > FE_RESET_R                                       $7      !0, ->36
          7    > > FE_FETCH_R                                               $7, !2, ->36
   17     8    >   INIT_FCALL                                               'preg_match_all'
          9        SEND_VAL                                                 '%2F%5E%28%5B0-9%5D%2B%29%5Cs%2B%28%5B0-9%5D%2B%29%2F'
         10        SEND_VAR                                                 !2
         11        SEND_REF                                                 !3
         12        DO_ICALL                                                 
   20    13        ISSET_ISEMPTY_DIM_OBJ                         1  ~9      !3, 1
         14        BOOL_NOT                                         ~10     ~9
         15      > JMPZ                                                     ~10, ->35
   21    16    >   FETCH_DIM_R                                      ~11     !3, 1
         17        FETCH_DIM_R                                      ~12     ~11, 0
         18        IS_SMALLER                                       ~13     0, ~12
         19      > JMPZ_EX                                          ~13     ~13, ->24
         20    >   FETCH_DIM_R                                      ~14     !3, 2
         21        FETCH_DIM_R                                      ~15     ~14, 0
         22        IS_SMALLER                                       ~16     1, ~15
         23        BOOL                                             ~13     ~16
         24    > > JMPZ                                                     ~13, ->35
   22    25    >   FETCH_DIM_R                                      ~17     !3, 1
         26        FETCH_DIM_R                                      ~18     ~17, 0
         27        FETCH_CONSTANT                                   ~20     'MARK_COMM_START'
         28        ASSIGN_DIM                                               !1, ~18
         29        OP_DATA                                                  ~20
   23    30        FETCH_DIM_R                                      ~21     !3, 2
         31        FETCH_DIM_R                                      ~22     ~21, 0
         32        FETCH_CONSTANT                                   ~24     'MARK_COMM_END'
         33        ASSIGN_DIM                                               !1, ~22
         34        OP_DATA                                                  ~24
   14    35    > > JMP                                                      ->7
         36    >   FE_FREE                                                  $7
   28    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.78 ms | 1400 KiB | 19 Q