3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strToHex($string){ $hex = ''; for ($i=0; $i<strlen($string); $i++){ $ord = ord($string[$i]); $hexCode = dechex($ord); $hex .= substr('0'.$hexCode, -2); } return strToUpper($hex); } echo strToHex('The MyThemeShop Updater plugin is required for this theme.'); echo "\n"; echo strToHex('You need to <a href="[plugin_url]">connect with your MyThemeShop account</a> to use the current theme.'); echo "\n"; echo strToHex('Connect now');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qT8Zv
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'strtohex'
          1        SEND_VAL                                                 'The+MyThemeShop+Updater+plugin+is+required+for+this+theme.'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   13     4        ECHO                                                     '%0A'
   14     5        INIT_FCALL                                               'strtohex'
          6        SEND_VAL                                                 'You+need+to+%3Ca+href%3D%22%5Bplugin_url%5D%22%3Econnect+with+your+MyThemeShop+account%3C%2Fa%3E+to+use+the+current+theme.'
          7        DO_FCALL                                      0  $1      
          8        ECHO                                                     $1
   15     9        ECHO                                                     '%0A'
   16    10        INIT_FCALL                                               'strtohex'
         11        SEND_VAL                                                 'Connect+now'
         12        DO_FCALL                                      0  $2      
         13        ECHO                                                     $2
         14      > RETURN                                                   1

Function strtohex:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 4
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 4
Branch analysis from position: 23
Branch analysis from position: 4
filename:       /in/qT8Zv
function name:  strToHex
number of ops:  28
compiled vars:  !0 = $string, !1 = $hex, !2 = $i, !3 = $ord, !4 = $hexCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->20
    6     4    >   INIT_FCALL                                               'ord'
          5        FETCH_DIM_R                                      ~7      !0, !2
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
    7     9        INIT_FCALL                                               'dechex'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !4, $10
    8    13        INIT_FCALL                                               'substr'
         14        CONCAT                                           ~12     '0', !4
         15        SEND_VAL                                                 ~12
         16        SEND_VAL                                                 -2
         17        DO_ICALL                                         $13     
         18        ASSIGN_OP                                     8          !1, $13
    5    19        PRE_INC                                                  !2
         20    >   STRLEN                                           ~16     !0
         21        IS_SMALLER                                               !2, ~16
         22      > JMPNZ                                                    ~17, ->4
   10    23    >   INIT_FCALL                                               'strtoupper'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $18     
         26      > RETURN                                                   $18
   11    27*     > RETURN                                                   null

End of function strtohex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.04 ms | 1402 KiB | 24 Q