3v4l.org

run code in 300+ PHP versions simultaneously
<?php $u = '%e5%ad%99%e6%82%9f%e7%a9%ba'; $o1 = urldecode($u); echo $o1.PHP_EOL; $o2 = iconv('gb2312',"UTF-8//IGNORE",$o1); echo $o2; var_dump( mb_detect_encoding($o1, 'UTF-8') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4fg2B
function name:  (null)
number of ops:  22
compiled vars:  !0 = $u, !1 = $o1, !2 = $o2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%25e5%25ad%2599%25e6%2582%259f%25e7%25a9%25ba'
    4     1        INIT_FCALL                                               'urldecode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        CONCAT                                           ~6      !1, '%0A'
          6        ECHO                                                     ~6
    7     7        INIT_FCALL_BY_NAME                                       'iconv'
          8        SEND_VAL_EX                                              'gb2312'
          9        SEND_VAL_EX                                              'UTF-8%2F%2FIGNORE'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !2, $7
    8    13        ECHO                                                     !2
   10    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'mb_detect_encoding'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 'UTF-8'
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.13 ms | 1395 KiB | 19 Q