3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = range(0, 100); $v = 1; switch (true) { case in_array($v, $d): echo 'the value is either 1 or 2'; break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
filename:       /in/ODpHG
function name:  (null)
number of ops:  15
compiled vars:  !0 = $d, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 100
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        ASSIGN                                                   !1, 1
    6     6        INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10      > JMPNZ                                                    $6, ->12
         11    > > JMP                                                      ->14
    7    12    >   ECHO                                                     'the+value+is+either+1+or+2'
    8    13      > JMP                                                      ->14
    9    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.91 ms | 1394 KiB | 17 Q