3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bits = 32; $N = 0xfffffffb; var_dump(pow(2,32),$N); var_dump((int) -(pow(2, $bits) - $N)); // -5
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l7R7d
function name:  (null)
number of ops:  21
compiled vars:  !0 = $bits, !1 = $N
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 32
    3     1        ASSIGN                                                   !1, 4294967291
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'pow'
          4        SEND_VAL                                                 2
          5        SEND_VAL                                                 32
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'pow'
         12        SEND_VAL                                                 2
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        SUB                                              ~7      $6, !1
         16        MUL                                              ~8      ~7, -1
         17        CAST                                          4  ~9      ~8
         18        SEND_VAL                                                 ~9
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.64 ms | 1395 KiB | 17 Q