3v4l.org

run code in 300+ PHP versions simultaneously
<?php $seats = 7; $booked_seat = array('1','4','5','6','7'); $booked_a = array_flip($booked_seat); for ($i=1; $i <= $seats; $i++) { printf("seat: %d%s\n", $i, isset($booked_a[$i]) ? " booked" : ""); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
filename:       /in/5npsm
function name:  (null)
number of ops:  22
compiled vars:  !0 = $seats, !1 = $booked_seat, !2 = $booked_a, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 7
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_flip'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
    7     6        ASSIGN                                                   !3, 1
          7      > JMP                                                      ->19
    8     8    >   INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 'seat%3A+%25d%25s%0A'
         10        SEND_VAR                                                 !3
         11        ISSET_ISEMPTY_DIM_OBJ                         0          !2, !3
         12      > JMPZ                                                     ~9, ->15
         13    >   QM_ASSIGN                                        ~10     '+booked'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~10     ''
         16    >   SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
    7    18        PRE_INC                                                  !3
         19    >   IS_SMALLER_OR_EQUAL                                      !3, !0
         20      > JMPNZ                                                    ~13, ->8
    9    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.92 ms | 1395 KiB | 17 Q