3v4l.org

run code in 500+ PHP versions simultaneously
<?php $number = 0x12A; $string = '0x12A'; // direct decoding echo hexdec($string); // the reverse way $newString = '0x'.dechex($number); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5Yk3
function name:  (null)
number of ops:  10
compiled vars:  !0 = $number, !1 = $string, !2 = $newString
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 298
    5     1        ASSIGN                                                       !1, '0x12A'
    8     2        INIT_FCALL                                                   'hexdec'
          3        SEND_VAR                                                     !1
          4        DO_ICALL                                             $5      
          5        ECHO                                                         $5
   11     6        FRAMELESS_ICALL_1                dechex              ~6      !0
          7        CONCAT                                               ~7      '0x', ~6
          8        ASSIGN                                                       !2, ~7
   13     9      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
138.65 ms | 1467 KiB | 14 Q