3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0x40; $b = ~$a; // flip bits, i.e. 2s complement so -$a and then minus 1 var_dump("var_dump: $b"); // -65 printf("\nprintf: %d\n\n", $b); var_dump( base_convert($b, 10, 2) ); // 65 // **************************// // should be: printf("\nprintf: %b\n\n", $b); echo hexbin(0x40);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o9NmB
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 64
    3     1        BW_NOT                                           ~3      !0
          2        ASSIGN                                                   !1, ~3
    4     3        INIT_FCALL                                               'var_dump'
          4        NOP                                                      
          5        FAST_CONCAT                                      ~5      'var_dump%3A+', !1
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 '%0Aprintf%3A+%25d%0A%0A'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'base_convert'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 10
         16        SEND_VAL                                                 2
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
   12    20        INIT_FCALL                                               'printf'
         21        SEND_VAL                                                 '%0Aprintf%3A+%25b%0A%0A'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   13    24        INIT_FCALL_BY_NAME                                       'hexbin'
         25        SEND_VAL_EX                                              64
         26        DO_FCALL                                      0  $11     
         27        ECHO                                                     $11
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.61 ms | 1395 KiB | 19 Q