3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = mb_convert_encoding('хуй > пизда', 'cp1251', 'utf-8'); $htsc_charset = 'windows-1251'; //$quote_style = ENT_COMPAT; //if (version_compare(PHP_VERSION, '5.4.0') >= 0) { $quote_style = ENT_COMPAT|ENT_HTML401; //} $sentence = htmlspecialchars($sentence, $quote_style, $htsc_charset); echo mb_convert_encoding($sentence, 'utf-8', 'cp1251');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vHmim
function name:  (null)
number of ops:  21
compiled vars:  !0 = $sentence, !1 = $htsc_charset, !2 = $quote_style
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_convert_encoding'
          1        SEND_VAL                                                 '%D1%85%D1%83%D0%B9+%3E+%D0%BF%D0%B8%D0%B7%D0%B4%D0%B0'
          2        SEND_VAL                                                 'cp1251'
          3        SEND_VAL                                                 'utf-8'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    5     6        ASSIGN                                                   !1, 'windows-1251'
    9     7        ASSIGN                                                   !2, 2
   12     8        INIT_FCALL                                               'htmlspecialchars'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
   14    14        INIT_FCALL                                               'mb_convert_encoding'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'utf-8'
         17        SEND_VAL                                                 'cp1251'
         18        DO_ICALL                                         $9      
         19        ECHO                                                     $9
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.77 ms | 1395 KiB | 17 Q