3v4l.org

run code in 500+ PHP versions simultaneously
<?php function intval32bits($value) { $value = ($value & 0xFFFFFFFF); if ($value & 0x80000000) $value = -((~$value & 0xFFFFFFFF) + 1); return $value; } function shift_left_32( $a, $b ):int { return intval32bits( $a << $b ); } echo shift_left_32(0, 5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YPHku
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'shift_left_32'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 5
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function intval32bits:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/YPHku
function name:  intval32bits
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        BW_AND                                           ~1      !0, 4294967295
          2        ASSIGN                                                   !0, ~1
    7     3        BW_AND                                           ~3      !0, 2147483648
          4      > JMPZ                                                     ~3, ->10
    8     5    >   BW_NOT                                           ~4      !0
          6        BW_AND                                           ~5      ~4, 4294967295
          7        ADD                                              ~6      ~5, 1
          8        MUL                                              ~7      ~6, -1
          9        ASSIGN                                                   !0, ~7
   10    10    > > RETURN                                                   !0
   11    11*     > RETURN                                                   null

End of function intval32bits

Function shift_left_32:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YPHku
function name:  shift_left_32
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'intval32bits'
          3        SL                                               ~2      !0, !1
          4        SEND_VAL                                                 ~2
          5        DO_FCALL                                      0  $3      
          6        VERIFY_RETURN_TYPE                                       $3
          7      > RETURN                                                   $3
   15     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function shift_left_32

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 2054 KiB | 13 Q