3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ "0×00" => "@", "0×01" => "£", "0×02" => "$", //... need to fill here all the table ]; function hexToGSM($hex,$array) { if(array_key_exists($hex,$array)) return $array[$hex]; else return null; } var_dump(hexToGSM("0×01",$array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fXO5r
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        INIT_FCALL                                                   'var_dump'
          2        INIT_FCALL                                                   'hextogsm'
          3        SEND_VAL                                                     '0%C3%9701'
          4        SEND_VAR                                                     !0
          5        DO_FCALL                                          0  $2      
          6        SEND_VAR                                                     $2
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Function hextogsm:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fXO5r
function name:  hexToGSM
number of ops:  9
compiled vars:  !0 = $hex, !1 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   14     2        ARRAY_KEY_EXISTS                                             !0, !1
          3      > JMPZ                                                         ~2, ->7
          4    >   FETCH_DIM_R                                          ~3      !1, !0
          5      > RETURN                                                       ~3
          6*       JMP                                                          ->8
   15     7    > > RETURN                                                       null
   16     8*     > RETURN                                                       null

End of function hextogsm

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.72 ms | 2065 KiB | 15 Q