3v4l.org

run code in 300+ PHP versions simultaneously
<?php // \u0130 $s = 'u\'ZENG\u0130N OL YADA U\u011eRUNDA \xd6L\''; if ( substr($s, 0, 2) == 'u\'' && substr($s, -1) == '\'' ) { $s = substr($s, 2, strlen($s) - 3); $s = preg_replace('/\\\\u([0-9a-f][0-9a-f][0-9a-f][0-9a-f])/', '&#x\1;', $s); $s = preg_replace('/\\\\([0-9a-f][0-9a-f])/', '&#x\1;', $s); var_dump($s); var_dump(mb_convert_encoding($s, 'UTF-8', 'HTML-ENTITIES') ); } else { die('gestorben wegen: ' . $s); } var_dump(mb_convert_encoding('&#x0130;', 'UTF-8', 'HTML-ENTITIES') );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 47
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 14
filename:       /in/4iMYC
function name:  (null)
number of ops:  58
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'u%27ZENG%5Cu0130N+OL+YADA+U%5Cu011eRUNDA+%5Cxd6L%27'
    6     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $2      
          6        IS_EQUAL                                         ~3      $2, 'u%27'
          7      > JMPZ_EX                                          ~3      ~3, ->14
          8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 -1
         11        DO_ICALL                                         $4      
         12        IS_EQUAL                                         ~5      $4, '%27'
         13        BOOL                                             ~3      ~5
         14    > > JMPZ                                                     ~3, ->47
    7    15    >   INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 2
         18        STRLEN                                           ~6      !0
         19        SUB                                              ~7      ~6, 3
         20        SEND_VAL                                                 ~7
         21        DO_ICALL                                         $8      
         22        ASSIGN                                                   !0, $8
    8    23        INIT_FCALL                                               'preg_replace'
         24        SEND_VAL                                                 '%2F%5C%5Cu%28%5B0-9a-f%5D%5B0-9a-f%5D%5B0-9a-f%5D%5B0-9a-f%5D%29%2F'
         25        SEND_VAL                                                 '%26%23x%5C1%3B'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $10     
         28        ASSIGN                                                   !0, $10
    9    29        INIT_FCALL                                               'preg_replace'
         30        SEND_VAL                                                 '%2F%5C%5C%28%5B0-9a-f%5D%5B0-9a-f%5D%29%2F'
         31        SEND_VAL                                                 '%26%23x%5C1%3B'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $12     
         34        ASSIGN                                                   !0, $12
   10    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
   11    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'mb_convert_encoding'
         40        SEND_VAR                                                 !0
         41        SEND_VAL                                                 'UTF-8'
         42        SEND_VAL                                                 'HTML-ENTITIES'
         43        DO_ICALL                                         $15     
         44        SEND_VAR                                                 $15
         45        DO_ICALL                                                 
         46      > JMP                                                      ->49
   13    47    >   CONCAT                                           ~17     'gestorben+wegen%3A+', !0
         48      > EXIT                                                     ~17
   16    49    >   INIT_FCALL                                               'var_dump'
         50        INIT_FCALL                                               'mb_convert_encoding'
         51        SEND_VAL                                                 '%26%23x0130%3B'
         52        SEND_VAL                                                 'UTF-8'
         53        SEND_VAL                                                 'HTML-ENTITIES'
         54        DO_ICALL                                         $18     
         55        SEND_VAR                                                 $18
         56        DO_ICALL                                                 
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.72 ms | 1400 KiB | 21 Q