3v4l.org

run code in 300+ PHP versions simultaneously
<?php $color = 'FF1122'; echo $color; echo PHP_EOL; print_r( array( 'R' => hexdec($color[0] . $color[1]), 'G' => hexdec($color[2] . $color[3]), 'B' => hexdec($color[4] . $color[5]), ) ); $test = sscanf($color, '%02x%02x%02x', $RGB['R'], $RGB['G'], $RGB['B']); var_dump($test); print_r( $RGB ); echo PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UALqa
function name:  (null)
number of ops:  46
compiled vars:  !0 = $color, !1 = $test, !2 = $RGB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'FF1122'
    5     1        ECHO                                                     !0
    6     2        ECHO                                                     '%0A'
    8     3        INIT_FCALL                                               'print_r'
    9     4        INIT_FCALL                                               'hexdec'
          5        FETCH_DIM_R                                      ~4      !0, 0
          6        FETCH_DIM_R                                      ~5      !0, 1
          7        CONCAT                                           ~6      ~4, ~5
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        INIT_ARRAY                                       ~8      $7, 'R'
   10    11        INIT_FCALL                                               'hexdec'
         12        FETCH_DIM_R                                      ~9      !0, 2
         13        FETCH_DIM_R                                      ~10     !0, 3
         14        CONCAT                                           ~11     ~9, ~10
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        ADD_ARRAY_ELEMENT                                ~8      $12, 'G'
   11    18        INIT_FCALL                                               'hexdec'
         19        FETCH_DIM_R                                      ~13     !0, 4
         20        FETCH_DIM_R                                      ~14     !0, 5
         21        CONCAT                                           ~15     ~13, ~14
         22        SEND_VAL                                                 ~15
         23        DO_ICALL                                         $16     
         24        ADD_ARRAY_ELEMENT                                ~8      $16, 'B'
         25        SEND_VAL                                                 ~8
         26        DO_ICALL                                                 
   14    27        INIT_FCALL                                               'sscanf'
         28        SEND_VAR                                                 !0
         29        SEND_VAL                                                 '%2502x%2502x%2502x'
         30        FETCH_DIM_W                                      $18     !2, 'R'
         31        SEND_REF                                                 $18
         32        FETCH_DIM_W                                      $19     !2, 'G'
         33        SEND_REF                                                 $19
         34        FETCH_DIM_W                                      $20     !2, 'B'
         35        SEND_REF                                                 $20
         36        DO_ICALL                                         $21     
         37        ASSIGN                                                   !1, $21
   15    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
   16    41        INIT_FCALL                                               'print_r'
         42        SEND_VAR                                                 !2
         43        DO_ICALL                                                 
   18    44        ECHO                                                     '%0A'
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.17 ms | 1400 KiB | 21 Q