3v4l.org

run code in 500+ PHP versions simultaneously
<?php $hex = '#ffffff'; $red = hexdec( substr( $hex, 0, 2 ) ); $green = hexdec( substr( $hex, 2, 2 ) ); $blue = hexdec( substr( $hex, 4, 2 ) ); var_dump(compact('red', 'green', 'blue'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RNVnF
function name:  (null)
number of ops:  28
compiled vars:  !0 = $hex, !1 = $red, !2 = $green, !3 = $blue
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%23ffffff'
    5     1        INIT_FCALL                                                   'hexdec'
          2        FRAMELESS_ICALL_3                substr              ~5      !0, 0
          3        OP_DATA                                                      2
          4        SEND_VAL                                                     ~5
          5        DO_ICALL                                             $6      
          6        ASSIGN                                                       !1, $6
    6     7        INIT_FCALL                                                   'hexdec'
          8        FRAMELESS_ICALL_3                substr              ~8      !0, 2
          9        OP_DATA                                                      2
         10        SEND_VAL                                                     ~8
         11        DO_ICALL                                             $9      
         12        ASSIGN                                                       !2, $9
    7    13        INIT_FCALL                                                   'hexdec'
         14        FRAMELESS_ICALL_3                substr              ~11     !0, 4
         15        OP_DATA                                                      2
         16        SEND_VAL                                                     ~11
         17        DO_ICALL                                             $12     
         18        ASSIGN                                                       !3, $12
    9    19        INIT_FCALL                                                   'var_dump'
         20        INIT_FCALL                                                   'compact'
         21        SEND_VAL                                                     'red'
         22        SEND_VAL                                                     'green'
         23        SEND_VAL                                                     'blue'
         24        DO_ICALL                                             $14     
         25        SEND_VAR                                                     $14
         26        DO_ICALL                                                     
         27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.05 ms | 1915 KiB | 16 Q