3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0x80; var_dump(base_convert($a, 16, 2),$a); $b = -$a; var_dump(base_convert($b, 16, 2), $b); printf("%b", $b); echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qi62I
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 128
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'base_convert'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 16
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    4    10        MUL                                              ~5      !0, -1
         11        ASSIGN                                                   !1, ~5
    5    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'base_convert'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 16
         16        SEND_VAL                                                 2
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
    6    21        INIT_FCALL                                               'printf'
         22        SEND_VAL                                                 '%25b'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
    7    25        ECHO                                                     '%0A'
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.69 ms | 1395 KiB | 19 Q