3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.53 ms | 1396 KiB | 27 Q