3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cp1252str = ''; for ($i = 128; $i < 256; $i++) { $cp1252str .= chr($i); } print "Work iconv:\n"; iconv("cp1252", "utf-8//IGNORE", $cp1252str); print "Work iconv_strlen:\n"; iconv_strlen($cp1252str, "utf-8//IGNORE");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/rvFmg
function name:  (null)
number of ops:  22
compiled vars:  !0 = $cp1252str, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, 128
          2      > JMP                                                      ->8
    5     3    >   INIT_FCALL                                               'chr'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6        ASSIGN_OP                                     8          !0, $4
    4     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 256
          9      > JMPNZ                                                    ~7, ->3
    8    10    >   ECHO                                                     'Work+iconv%3A%0A'
    9    11        INIT_FCALL_BY_NAME                                       'iconv'
         12        SEND_VAL_EX                                              'cp1252'
         13        SEND_VAL_EX                                              'utf-8%2F%2FIGNORE'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
   10    16        ECHO                                                     'Work+iconv_strlen%3A%0A'
   11    17        INIT_FCALL_BY_NAME                                       'iconv_strlen'
         18        SEND_VAR_EX                                              !0
         19        SEND_VAL_EX                                              'utf-8%2F%2FIGNORE'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.92 ms | 1395 KiB | 21 Q