3v4l.org

run code in 300+ PHP versions simultaneously
<?php $states = '1,2,3'; $statesArray = implode(',',$states); if(in_array('2',$statesArray)) { echo 'bestseller'; } if(in_array('1',$statesArray)) { echo 'newproduct'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 12
filename:       /in/IHWOZ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $states, !1 = $statesArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%2C2%2C3'
    5     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    7     6        INIT_FCALL                                               'in_array'
          7        SEND_VAL                                                 '2'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10      > JMPZ                                                     $5, ->12
    8    11    >   ECHO                                                     'bestseller'
   10    12    >   INIT_FCALL                                               'in_array'
         13        SEND_VAL                                                 '1'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $6      
         16      > JMPZ                                                     $6, ->18
   11    17    >   ECHO                                                     'newproduct'
   12    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.07 ms | 1395 KiB | 17 Q