3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.96 ms | 1395 KiB | 19 Q