3v4l.org

run code in 300+ PHP versions simultaneously
<?php //mb_internal_encoding('UTF-8'); $value = 'g' . chr(0xa4) .'eld'; mb_substitute_character('none'); $originalValue = $value; var_dump(mb_detect_encoding($value, mb_detect_order())); $value = mb_convert_encoding($value, 'UTF-8'); var_dump($value, mb_strlen($value, 'UTF-8'), mb_strlen($originalValue));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ccfVB
function name:  (null)
number of ops:  32
compiled vars:  !0 = $value, !1 = $originalValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'g%A4eld'
    6     1        INIT_FCALL                                               'mb_substitute_character'
          2        SEND_VAL                                                 'none'
          3        DO_ICALL                                                 
    7     4        ASSIGN                                                   !1, !0
    9     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'mb_detect_encoding'
          7        SEND_VAR                                                 !0
          8        INIT_FCALL                                               'mb_detect_order'
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'mb_convert_encoding'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'UTF-8'
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !0, $8
   11    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        INIT_FCALL                                               'mb_strlen'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 'UTF-8'
         24        DO_ICALL                                         $10     
         25        SEND_VAR                                                 $10
         26        INIT_FCALL                                               'mb_strlen'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $11     
         29        SEND_VAR                                                 $11
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1395 KiB | 25 Q