3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_string = "Ку ку"; $arra_c = array("ASCII//IGNORE", "Windows-1252//IGNORE", "ISO-8859-15//IGNORE", "ISO-8859-1//IGNORE", "ISO-8859-6//IGNORE", "CP1256//IGNORE"); //foreach($arra_c as $k => $v){ var_dump(mb_convert_encoding($some_string,$v,"UTF-8" )); //} var_dump(mb_detect_encoding($some_string)); var_dump(strlen(json_encode(array('message' => $some_string))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cbnrZ
function name:  (null)
number of ops:  25
compiled vars:  !0 = $some_string, !1 = $arra_c, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%D0%9A%D1%83+%D0%BA%D1%83'
    5     1        ASSIGN                                                   !1, <array>
    9     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'mb_convert_encoding'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 'UTF-8'
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
   15    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'mb_detect_encoding'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
   16    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'json_encode'
         18        INIT_ARRAY                                       ~9      !0, 'message'
         19        SEND_VAL                                                 ~9
         20        DO_ICALL                                         $10     
         21        STRLEN                                           ~11     $10
         22        SEND_VAL                                                 ~11
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.98 ms | 1395 KiB | 21 Q