3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = "0xa"; $hexstr = sprintf("%x",( $num + 3)); // 0 $hexstr2 = sprintf("%s", hexdec($num) + 3 ); var_dump($hexstr,$hexstr2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C7Ch4
function name:  (null)
number of ops:  21
compiled vars:  !0 = $num, !1 = $hexstr, !2 = $hexstr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '0xa'
    4     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%25x'
          3        ADD                                              ~4      !0, 3
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    5     7        INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 '%25s'
          9        INIT_FCALL                                               'hexdec'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ADD                                              ~8      $7, 3
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
    6    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.02 ms | 1395 KiB | 19 Q