3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = range(1, 10000); foreach($x as $item) { if(in_array($item, $x)) { echo "item $item in array \n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/RVC6u
function name:  (null)
number of ops:  19
compiled vars:  !0 = $x, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    3     5      > FE_RESET_R                                       $4      !0, ->17
          6    > > FE_FETCH_R                                               $4, !1, ->17
    4     7    >   INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11      > JMPZ                                                     $5, ->16
    5    12    >   ROPE_INIT                                     3  ~7      'item+'
         13        ROPE_ADD                                      1  ~7      ~7, !1
         14        ROPE_END                                      2  ~6      ~7, '+in+array+%0A'
         15        ECHO                                                     ~6
    3    16    > > JMP                                                      ->6
         17    >   FE_FREE                                                  $4
    7    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1395 KiB | 17 Q