3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.24 ms | 1408 KiB | 18 Q