3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getEmojiFlag(string $countryCode): string { $regionalOffset = 0x1F1A5; return mb_chr($regionalOffset + mb_ord($countryCode[0], 'UTF-8'), 'UTF-8') . mb_chr($regionalOffset + mb_ord($countryCode[1], 'UTF-8'), 'UTF-8'); } echo getEmojiFlag('DZ');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a38C1
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'getemojiflag'
          1        SEND_VAL                                                 'DZ'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function getemojiflag:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a38C1
function name:  getEmojiFlag
number of ops:  27
compiled vars:  !0 = $countryCode, !1 = $regionalOffset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, 127397
    7     2        INIT_FCALL                                               'mb_chr'
          3        INIT_FCALL                                               'mb_ord'
          4        FETCH_DIM_R                                      ~3      !0, 0
          5        SEND_VAL                                                 ~3
          6        SEND_VAL                                                 'UTF-8'
          7        DO_ICALL                                         $4      
          8        ADD                                              ~5      !1, $4
          9        SEND_VAL                                                 ~5
         10        SEND_VAL                                                 'UTF-8'
         11        DO_ICALL                                         $6      
    8    12        INIT_FCALL                                               'mb_chr'
         13        INIT_FCALL                                               'mb_ord'
         14        FETCH_DIM_R                                      ~7      !0, 1
         15        SEND_VAL                                                 ~7
         16        SEND_VAL                                                 'UTF-8'
         17        DO_ICALL                                         $8      
         18        ADD                                              ~9      !1, $8
         19        SEND_VAL                                                 ~9
         20        SEND_VAL                                                 'UTF-8'
         21        DO_ICALL                                         $10     
         22        CONCAT                                           ~11     $6, $10
         23        VERIFY_RETURN_TYPE                                       ~11
         24      > RETURN                                                   ~11
    9    25*       VERIFY_RETURN_TYPE                                       
         26*     > RETURN                                                   null

End of function getemojiflag

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.74 ms | 1014 KiB | 16 Q