3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "\ud83d\ude01"; $str = json_decode('"' . $str . '"'); $bytes = str_split($str); for ($i = 0; $i < count($bytes); $i++) { $bytes[$i] = "\x" . dechex(ord($bytes[$i])); } $str = implode('',$bytes); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
Branch analysis from position: 13
filename:       /in/A1PEn
function name:  (null)
number of ops:  29
compiled vars:  !0 = $str, !1 = $bytes, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%5Cud83d%5Cude01'
    3     1        INIT_FCALL                                                   'json_decode'
          2        CONCAT                                               ~4      '%22', !0
          3        CONCAT                                               ~5      ~4, '%22'
          4        SEND_VAL                                                     ~5
          5        DO_ICALL                                             $6      
          6        ASSIGN                                                       !0, $6
    4     7        INIT_FCALL                                                   'str_split'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                             $8      
         10        ASSIGN                                                       !1, $8
    5    11        ASSIGN                                                       !2, 0
         12      > JMP                                                          ->22
    6    13    >   INIT_FCALL                                                   'ord'
         14        FETCH_DIM_R                                          ~12     !1, !2
         15        SEND_VAL                                                     ~12
         16        DO_ICALL                                             $13     
         17        FRAMELESS_ICALL_1                dechex              ~14     $13
         18        CONCAT                                               ~15     '%5Cx', ~14
         19        ASSIGN_DIM                                                   !1, !2
         20        OP_DATA                                                      ~15
    5    21        PRE_INC                                                      !2
         22    >   COUNT                                                ~17     !1
         23        IS_SMALLER                                                   !2, ~17
         24      > JMPNZ                                                        ~18, ->13
    8    25    >   FRAMELESS_ICALL_2                implode             ~19     '', !1
         26        ASSIGN                                                       !0, ~19
   10    27        ECHO                                                         !0
   11    28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.1 ms | 3320 KiB | 16 Q