3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = 12; $bin_val = 1 << ($val -1); var_dump($bin_val); $val = 1 >> ($val - 1); var_dump($val);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vHlpi
function name:  (null)
number of ops:  14
compiled vars:  !0 = $val, !1 = $bin_val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 12
    6     1        SUB                                              ~3      !0, 1
          2        SL                                               ~4      1, ~3
          3        ASSIGN                                                   !1, ~4
    8     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   11     7        SUB                                              ~7      !0, 1
          8        SR                                               ~8      1, ~7
          9        ASSIGN                                                   !0, ~8
   12    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.39 ms | 1394 KiB | 15 Q