3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\u00c5\u00a0koda"; $str = preg_replace("/\\\\u([a-f0-9]{4})/e", "iconv('iso-8859-1','UTF-8',pack('V', hexdec('U$1')))", json_encode($str )); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LPr49
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5Cu00c5%5Cu00a0koda'
    6     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5C%5Cu%28%5Ba-f0-9%5D%7B4%7D%29%2Fe'
          3        SEND_VAL                                                 'iconv%28%27iso-8859-1%27%2C%27UTF-8%27%2Cpack%28%27V%27%2C+hexdec%28%27U%241%27%29%29%29'
          4        INIT_FCALL                                               'json_encode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ASSIGN                                                   !0, $3
    9    10        ECHO                                                     !0
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.89 ms | 1394 KiB | 17 Q