3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.37 ms | 1395 KiB | 19 Q