3v4l.org

run code in 500+ PHP versions simultaneously
<?php $checks = [ 0 => 0, 1 => 32, 2 => 64, 3 => 96, 4 => 128, 5 => 160 ]; foreach($checks as $left => $right) { var_dump(sprintf("%3s << 5 : %3s [%3s][%5s]", $left, ($left << 5) , $right, (($left << 5) === $right ? 'OK' : 'FAILED'))); } var_dump(""); var_dump(""); foreach($checks as $left => $right) { var_dump(sprintf("%3s >> 5 : %3s [%3s][%5s]", $right, ($right >> 5) , $left, (($right >> 5) === $left ? 'OK' : 'FAILED'))); } // check undefined array key and fallback $array = []; var_dump($array['undefined'] >> 5); var_dump(($array['undefined'] ?? 0) >> 5);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 22
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 50
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 50
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
Branch analysis from position: 22
filename:       /in/89BZ9
function name:  (null)
number of ops:  65
compiled vars:  !0 = $checks, !1 = $right, !2 = $left, !3 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1      > FE_RESET_R                                           $5      !0, ->22
          2    > > FE_FETCH_R                                           ~6      $5, !1, ->22
          3    >   ASSIGN                                                       !2, ~6
   14     4        INIT_FCALL                                                   'var_dump'
          5        INIT_FCALL                                                   'sprintf'
          6        SEND_VAL                                                     '%253s+%3C%3C+5+%3A+%253s+%5B%253s%5D%5B%255s%5D'
          7        SEND_VAR                                                     !2
          8        SL                                                   ~8      !2, 5
          9        SEND_VAL                                                     ~8
         10        SEND_VAR                                                     !1
         11        SL                                                   ~9      !2, 5
         12        IS_IDENTICAL                                                 !1, ~9
         13      > JMPZ                                                         ~10, ->16
         14    >   QM_ASSIGN                                            ~11     'OK'
         15      > JMP                                                          ->17
         16    >   QM_ASSIGN                                            ~11     'FAILED'
         17    >   SEND_VAL                                                     ~11
         18        DO_ICALL                                             $12     
         19        SEND_VAR                                                     $12
         20        DO_ICALL                                                     
   13    21      > JMP                                                          ->2
         22    >   FE_FREE                                                      $5
   17    23        INIT_FCALL                                                   'var_dump'
         24        SEND_VAL                                                     ''
         25        DO_ICALL                                                     
   18    26        INIT_FCALL                                                   'var_dump'
         27        SEND_VAL                                                     ''
         28        DO_ICALL                                                     
   21    29      > FE_RESET_R                                           $16     !0, ->50
         30    > > FE_FETCH_R                                           ~17     $16, !1, ->50
         31    >   ASSIGN                                                       !2, ~17
   22    32        INIT_FCALL                                                   'var_dump'
         33        INIT_FCALL                                                   'sprintf'
         34        SEND_VAL                                                     '%253s+%3E%3E+5+%3A+%253s+%5B%253s%5D%5B%255s%5D'
         35        SEND_VAR                                                     !1
         36        SR                                                   ~19     !1, 5
         37        SEND_VAL                                                     ~19
         38        SEND_VAR                                                     !2
         39        SR                                                   ~20     !1, 5
         40        IS_IDENTICAL                                                 !2, ~20
         41      > JMPZ                                                         ~21, ->44
         42    >   QM_ASSIGN                                            ~22     'OK'
         43      > JMP                                                          ->45
         44    >   QM_ASSIGN                                            ~22     'FAILED'
         45    >   SEND_VAL                                                     ~22
         46        DO_ICALL                                             $23     
         47        SEND_VAR                                                     $23
         48        DO_ICALL                                                     
   21    49      > JMP                                                          ->30
         50    >   FE_FREE                                                      $16
   27    51        ASSIGN                                                       !3, <array>
   28    52        INIT_FCALL                                                   'var_dump'
         53        FETCH_DIM_R                                          ~26     !3, 'undefined'
         54        SR                                                   ~27     ~26, 5
         55        SEND_VAL                                                     ~27
         56        DO_ICALL                                                     
   29    57        INIT_FCALL                                                   'var_dump'
         58        FETCH_DIM_IS                                         ~29     !3, 'undefined'
         59        COALESCE                                             ~30     ~29
         60        QM_ASSIGN                                            ~30     0
         61        SR                                                   ~31     ~30, 5
         62        SEND_VAL                                                     ~31
         63        DO_ICALL                                                     
         64      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
143.37 ms | 518 KiB | 11 Q