3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "0x80" + 0; var_dump($a); $converted = base_convert($a, 16, 2); printf("\n%d\n",$converted); printf("%b",$a); echo "\n\n"; $b = -$a; var_dump(base_convert($b, 16, 2), $b); printf("%b", $b); echo "\n"; $c = 100; $d = ~$c; var_dump($c,$d); echo $c + $d; echo "\n\n"; $a = 0x80; var_dump($a,base_convert($a, 16, 2)); var_dump( hexdec("0x80") );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okahW
function name:  (null)
number of ops:  63
compiled vars:  !0 = $a, !1 = $converted, !2 = $b, !3 = $c, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ADD                                              ~5      '0x80', 0
          1        ASSIGN                                                   !0, ~5
    3     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    4     5        INIT_FCALL                                               'base_convert'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 16
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    5    11        INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 '%0A%25d%0A'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    6    15        INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%25b'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
    7    19        ECHO                                                     '%0A%0A'
    8    20        MUL                                              ~12     !0, -1
         21        ASSIGN                                                   !2, ~12
    9    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'base_convert'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 16
         26        SEND_VAL                                                 2
         27        DO_ICALL                                         $14     
         28        SEND_VAR                                                 $14
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                                 
   10    31        INIT_FCALL                                               'printf'
         32        SEND_VAL                                                 '%25b'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                                 
   11    35        ECHO                                                     '%0A'
   12    36        ASSIGN                                                   !3, 100
   13    37        BW_NOT                                           ~18     !3
         38        ASSIGN                                                   !4, ~18
   14    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !3
         41        SEND_VAR                                                 !4
         42        DO_ICALL                                                 
   15    43        ADD                                              ~21     !3, !4
         44        ECHO                                                     ~21
   17    45        ECHO                                                     '%0A%0A'
   18    46        ASSIGN                                                   !0, 128
   19    47        INIT_FCALL                                               'var_dump'
         48        SEND_VAR                                                 !0
         49        INIT_FCALL                                               'base_convert'
         50        SEND_VAR                                                 !0
         51        SEND_VAL                                                 16
         52        SEND_VAL                                                 2
         53        DO_ICALL                                         $23     
         54        SEND_VAR                                                 $23
         55        DO_ICALL                                                 
   20    56        INIT_FCALL                                               'var_dump'
         57        INIT_FCALL                                               'hexdec'
         58        SEND_VAL                                                 '0x80'
         59        DO_ICALL                                         $25     
         60        SEND_VAR                                                 $25
         61        DO_ICALL                                                 
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.21 ms | 1400 KiB | 21 Q