3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'ru_RU.CP1251'); $str = "Оригинальный картридж HP C9700A (121A) (черный)"; $str = trim(str_ireplace("Оригинальный", "", $str)); $str = iconv("UTF-8", "Windows-1251", $str); $str = ucfirst($str); $str = iconv("Windows-1251", "UTF-8", $str); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KsonO
function name:  (null)
number of ops:  32
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'ru_RU.CP1251'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, '%D0%9E%D1%80%D0%B8%D0%B3%D0%B8%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9+%D0%BA%D0%B0%D1%80%D1%82%D1%80%D0%B8%D0%B4%D0%B6+HP+C9700A+%28121A%29+%28%D1%87%D0%B5%D1%80%D0%BD%D1%8B%D0%B9%29'
    7     5        INIT_FCALL                                               'trim'
          6        INIT_FCALL                                               'str_ireplace'
          7        SEND_VAL                                                 '%D0%9E%D1%80%D0%B8%D0%B3%D0%B8%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9'
          8        SEND_VAL                                                 ''
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13        ASSIGN                                                   !0, $4
    9    14        INIT_FCALL_BY_NAME                                       'iconv'
         15        SEND_VAL_EX                                              'UTF-8'
         16        SEND_VAL_EX                                              'Windows-1251'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $6      
         19        ASSIGN                                                   !0, $6
   10    20        INIT_FCALL                                               'ucfirst'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $8      
         23        ASSIGN                                                   !0, $8
   11    24        INIT_FCALL_BY_NAME                                       'iconv'
         25        SEND_VAL_EX                                              'Windows-1251'
         26        SEND_VAL_EX                                              'UTF-8'
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0  $10     
         29        ASSIGN                                                   !0, $10
   13    30        ECHO                                                     !0
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.59 ms | 1396 KiB | 21 Q