3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objs = (object)[ 'data' => [ (object)['guestEmail' => 'bad@example.com'], (object)['guestEmail' => 'okay@goodstuff.com'], (object)['guestEmail' => 'nope@example1.com'] ] ]; $blacklist = ['@example.com', 'example1.com']; $regex = '~\Q' . implode('\E|\Q', $blacklist) . '\E~'; foreach ($objs->data as $row) { if (!preg_match($regex, $row->guestEmail)) { $emails[] = $row->guestEmail; } } var_export($emails);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 31
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 30
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/PA7qc
function name:  (null)
number of ops:  36
compiled vars:  !0 = $objs, !1 = $blacklist, !2 = $regex, !3 = $row, !4 = $emails
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~5      <array>
          1        INIT_ARRAY                                       ~6      ~5
    5     2        CAST                                          8  ~7      <array>
          3        ADD_ARRAY_ELEMENT                                ~6      ~7
    6     4        CAST                                          8  ~8      <array>
          5        ADD_ARRAY_ELEMENT                                ~6      ~8
          6        INIT_ARRAY                                       ~9      ~6, 'data'
          7        CAST                                          8  ~10     ~9
    2     8        ASSIGN                                                   !0, ~10
   10     9        ASSIGN                                                   !1, <array>
   11    10        INIT_FCALL                                               'implode'
         11        SEND_VAL                                                 '%5CE%7C%5CQ'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $13     
         14        CONCAT                                           ~14     '%7E%5CQ', $13
         15        CONCAT                                           ~15     ~14, '%5CE%7E'
         16        ASSIGN                                                   !2, ~15
   13    17        FETCH_OBJ_R                                      ~17     !0, 'data'
         18      > FE_RESET_R                                       $18     ~17, ->31
         19    > > FE_FETCH_R                                               $18, !3, ->31
   14    20    >   INIT_FCALL                                               'preg_match'
         21        SEND_VAR                                                 !2
         22        FETCH_OBJ_R                                      ~19     !3, 'guestEmail'
         23        SEND_VAL                                                 ~19
         24        DO_ICALL                                         $20     
         25        BOOL_NOT                                         ~21     $20
         26      > JMPZ                                                     ~21, ->30
   15    27    >   FETCH_OBJ_R                                      ~23     !3, 'guestEmail'
         28        ASSIGN_DIM                                               !4
         29        OP_DATA                                                  ~23
   13    30    > > JMP                                                      ->19
         31    >   FE_FREE                                                  $18
   19    32        INIT_FCALL                                               'var_export'
         33        SEND_VAR                                                 !4
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.55 ms | 1401 KiB | 19 Q