3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = mb_convert_encoding('хуй > пизда', 'windows-1251', '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', 'windows-1251');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/dv8Js
function name:  (null)
number of ops:  28
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                                                 'windows-1251'
          3        SEND_VAL                                                 'utf-8'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    5     6        ASSIGN                                                   !1, 'windows-1251'
    7     7        ASSIGN                                                   !2, 2
    8     8        INIT_FCALL                                               'version_compare'
          9        SEND_VAL                                                 '8.0.0'
         10        SEND_VAL                                                 '5.4.0'
         11        DO_ICALL                                         $7      
         12        IS_SMALLER_OR_EQUAL                                      0, $7
         13      > JMPZ                                                     ~8, ->15
    9    14    >   ASSIGN                                                   !2, 2
   12    15    >   INIT_FCALL                                               'htmlspecialchars'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !0, $10
   14    21        INIT_FCALL                                               'mb_convert_encoding'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 'utf-8'
         24        SEND_VAL                                                 'windows-1251'
         25        DO_ICALL                                         $12     
         26        ECHO                                                     $12
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.39 ms | 1395 KiB | 19 Q