3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\357\277\275\016\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275\357\277\275:\357\277\275\357\277\275\034\357\277\275\357\27"; $charset = mb_detect_encoding($str , "WINDOWS-1255,ASCII"); echo "detect $charset\n"; $str = mb_convert_encoding($str, "UTF-8", $charset); echo "convert %str\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rKSCa
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $charset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%EF%BF%BD%0E%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%3A%EF%BF%BD%EF%BF%BD%1C%EF%BF%BD%EF%17'
    3     1        INIT_FCALL                                               'mb_detect_encoding'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'WINDOWS-1255%2CASCII'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    4     6        ROPE_INIT                                     3  ~6      'detect+'
          7        ROPE_ADD                                      1  ~6      ~6, !1
          8        ROPE_END                                      2  ~5      ~6, '%0A'
          9        ECHO                                                     ~5
    5    10        INIT_FCALL                                               'mb_convert_encoding'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 'UTF-8'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !0, $8
    6    16        ECHO                                                     'convert+%25str%0A'
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.03 ms | 1395 KiB | 17 Q