3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = base_convert("fffffffe",16,2); var_dump($num); $arr = str_split($num); for ($i=0,$max = count($arr)-1; $i <=$max; $i++) { if ($arr[$i] == '1' ) { $arr[$i] = '0'; } else if ($arr[$i] == '0') { $arr[$i] = '1'; } } $str = join('',$arr); var_dump($str); $converted = base_convert($str,2,16); $hex = '0x'.$converted; $a = gmp_add($hex,"1"); echo gmp_strval($a),'<BR>'; $a = -(gmp_intval($a)); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 18
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 18
Branch analysis from position: 32
Branch analysis from position: 18
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 18
Branch analysis from position: 32
Branch analysis from position: 18
Branch analysis from position: 29
filename:       /in/kHH1D
function name:  (null)
number of ops:  67
compiled vars:  !0 = $num, !1 = $arr, !2 = $i, !3 = $max, !4 = $str, !5 = $converted, !6 = $hex, !7 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'base_convert'
          1        SEND_VAL                                                 'fffffffe'
          2        SEND_VAL                                                 16
          3        SEND_VAL                                                 2
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !0, $8
    3     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'str_split'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !1, $11
    5    13        ASSIGN                                                   !2, 0
         14        COUNT                                            ~14     !1
         15        SUB                                              ~15     ~14, 1
         16        ASSIGN                                                   !3, ~15
         17      > JMP                                                      ->30
    7    18    >   FETCH_DIM_R                                      ~17     !1, !2
         19        IS_EQUAL                                                 ~17, '1'
         20      > JMPZ                                                     ~18, ->24
    8    21    >   ASSIGN_DIM                                               !1, !2
         22        OP_DATA                                                  '0'
         23      > JMP                                                      ->29
   10    24    >   FETCH_DIM_R                                      ~20     !1, !2
         25        IS_EQUAL                                                 ~20, '0'
         26      > JMPZ                                                     ~21, ->29
   11    27    >   ASSIGN_DIM                                               !1, !2
         28        OP_DATA                                                  '1'
    5    29    >   PRE_INC                                                  !2
         30    >   IS_SMALLER_OR_EQUAL                                      !2, !3
         31      > JMPNZ                                                    ~24, ->18
   14    32    >   INIT_FCALL                                               'join'
         33        SEND_VAL                                                 ''
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                         $25     
         36        ASSIGN                                                   !4, $25
   15    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !4
         39        DO_ICALL                                                 
   16    40        INIT_FCALL                                               'base_convert'
         41        SEND_VAR                                                 !4
         42        SEND_VAL                                                 2
         43        SEND_VAL                                                 16
         44        DO_ICALL                                         $28     
         45        ASSIGN                                                   !5, $28
   17    46        CONCAT                                           ~30     '0x', !5
         47        ASSIGN                                                   !6, ~30
   18    48        INIT_FCALL_BY_NAME                                       'gmp_add'
         49        SEND_VAR_EX                                              !6
         50        SEND_VAL_EX                                              '1'
         51        DO_FCALL                                      0  $32     
         52        ASSIGN                                                   !7, $32
   19    53        INIT_FCALL_BY_NAME                                       'gmp_strval'
         54        SEND_VAR_EX                                              !7
         55        DO_FCALL                                      0  $34     
         56        ECHO                                                     $34
         57        ECHO                                                     '%3CBR%3E'
   20    58        INIT_FCALL_BY_NAME                                       'gmp_intval'
         59        SEND_VAR_EX                                              !7
         60        DO_FCALL                                      0  $35     
         61        MUL                                              ~36     $35, -1
         62        ASSIGN                                                   !7, ~36
   21    63        INIT_FCALL                                               'var_dump'
         64        SEND_VAR                                                 !7
         65        DO_ICALL                                                 
         66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.03 ms | 1400 KiB | 30 Q