3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = [['name' => 'www.test.nl', 'type' => 'A'], ['name' => 'ftp.test.nl', 'type' => 'A'], ['name' => 'lol.test.nl', 'type' => 'A']]; foreach ($records as $record) { if (in_array($record['type'], ['A', 'C']) && (strpos($record['name'], 'www.') === 0 || strpos($record['name'], 'ftp.') === 0)) { echo 'You should see this echo twice!'.PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 24
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 24
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 23
Branch analysis from position: 20
Branch analysis from position: 21
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/iorqr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $records, !1 = $record
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $3      !0, ->24
          2    > > FE_FETCH_R                                               $3, !1, ->24
    6     3    >   FETCH_DIM_R                                      ~4      !1, 'type'
          4        IN_ARRAY                                         ~5      ~4, <array>
          5      > JMPZ_EX                                          ~5      ~5, ->21
          6    >   INIT_FCALL                                               'strpos'
          7        FETCH_DIM_R                                      ~6      !1, 'name'
          8        SEND_VAL                                                 ~6
          9        SEND_VAL                                                 'www.'
         10        DO_ICALL                                         $7      
         11        IS_IDENTICAL                                     ~8      $7, 0
         12      > JMPNZ_EX                                         ~8      ~8, ->20
         13    >   INIT_FCALL                                               'strpos'
         14        FETCH_DIM_R                                      ~9      !1, 'name'
         15        SEND_VAL                                                 ~9
         16        SEND_VAL                                                 'ftp.'
         17        DO_ICALL                                         $10     
         18        IS_IDENTICAL                                     ~11     $10, 0
         19        BOOL                                             ~8      ~11
         20    >   BOOL                                             ~5      ~8
         21    > > JMPZ                                                     ~5, ->23
    7    22    >   ECHO                                                     'You+should+see+this+echo+twice%21%0A'
    5    23    > > JMP                                                      ->2
         24    >   FE_FREE                                                  $3
    9    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.91 ms | 1388 KiB | 15 Q