3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = '24/08/2017,email@test.ie,1,2 21/05/2018,test@234.com,1,2 21/05/2018,test@test.ie,2,2'; $email = 'test@234.com'; //$lines = file("log.txt"); $lines = explode("\n", $file); $found = 0; foreach ($lines as $line){ if (strpos($line, $email) !==false){ $found = true; $arrayOfLine = explode(",", $line); $foundGroup = $arrayOfLine[2]; $foundVideo = $arrayOfLine[3]; } elseif (strpos($line, $email) ===false){ $found = false; } } print_r($arrayOfLine);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 35
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 35
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 34
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/GittA
function name:  (null)
number of ops:  40
compiled vars:  !0 = $file, !1 = $email, !2 = $lines, !3 = $found, !4 = $line, !5 = $arrayOfLine, !6 = $foundGroup, !7 = $foundVideo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '24%2F08%2F2017%2Cemail%40test.ie%2C1%2C2%0A21%2F05%2F2018%2Ctest%40234.com%2C1%2C2%0A21%2F05%2F2018%2Ctest%40test.ie%2C2%2C2'
    7     1        ASSIGN                                                   !1, 'test%40234.com'
   11     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $10     
          6        ASSIGN                                                   !2, $10
   12     7        ASSIGN                                                   !3, 0
   15     8      > FE_RESET_R                                       $13     !2, ->35
          9    > > FE_FETCH_R                                               $13, !4, ->35
   16    10    >   INIT_FCALL                                               'strpos'
         11        SEND_VAR                                                 !4
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $14     
         14        TYPE_CHECK                                  1018          $14
         15      > JMPZ                                                     ~15, ->27
   17    16    >   ASSIGN                                                   !3, <true>
   19    17        INIT_FCALL                                               'explode'
         18        SEND_VAL                                                 '%2C'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !5, $17
   21    22        FETCH_DIM_R                                      ~19     !5, 2
         23        ASSIGN                                                   !6, ~19
   22    24        FETCH_DIM_R                                      ~21     !5, 3
         25        ASSIGN                                                   !7, ~21
         26      > JMP                                                      ->34
   25    27    >   INIT_FCALL                                               'strpos'
         28        SEND_VAR                                                 !4
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $23     
         31        TYPE_CHECK                                    4          $23
         32      > JMPZ                                                     ~24, ->34
   26    33    >   ASSIGN                                                   !3, <false>
   15    34    > > JMP                                                      ->9
         35    >   FE_FREE                                                  $13
   30    36        INIT_FCALL                                               'print_r'
         37        SEND_VAR                                                 !5
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.35 ms | 1405 KiB | 19 Q