3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "Premium serviço Personal - 1 m�"; //$input = 'Premium serviço Personal - 1 mês'; var_dump( iconv("UTF-8", "UTF-8//IGNORE", $text) ); var_dump( utf8_encode(utf8_decode($input)) ); var_dump( utf8_encode($input) ); var_dump( utf8_decode($input) ); var_dump( mb_convert_encoding($input, 'utf-8', 'utf-8') ); var_dump( filter_var($input, FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW) ); var_dump(preg_replace('#[\x00-\x08\x0B-\x1F\x7F-\x9F]+#u', '', $input)) ; var_dump(htmlspecialchars_decode(htmlspecialchars($input, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8'), ENT_NOQUOTES));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0DQM6
function name:  (null)
number of ops:  67
compiled vars:  !0 = $input, !1 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Premium+servi%C3%A7o+Personal+-+1+m%EF%BF%BD'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL_BY_NAME                                       'iconv'
          3        SEND_VAL_EX                                              'UTF-8'
          4        SEND_VAL_EX                                              'UTF-8%2F%2FIGNORE'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'utf8_encode'
         11        INIT_FCALL                                               'utf8_decode'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'utf8_encode'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                                 
    8    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'utf8_decode'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $10     
         28        SEND_VAR                                                 $10
         29        DO_ICALL                                                 
    9    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'mb_convert_encoding'
         32        SEND_VAR                                                 !0
         33        SEND_VAL                                                 'utf-8'
         34        SEND_VAL                                                 'utf-8'
         35        DO_ICALL                                         $12     
         36        SEND_VAR                                                 $12
         37        DO_ICALL                                                 
   10    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'filter_var'
         40        SEND_VAR                                                 !0
         41        SEND_VAL                                                 514
         42        SEND_VAL                                                 4
         43        DO_ICALL                                         $14     
         44        SEND_VAR                                                 $14
         45        DO_ICALL                                                 
   11    46        INIT_FCALL                                               'var_dump'
         47        INIT_FCALL                                               'preg_replace'
         48        SEND_VAL                                                 '%23%5B%5Cx00-%5Cx08%5Cx0B-%5Cx1F%5Cx7F-%5Cx9F%5D%2B%23u'
         49        SEND_VAL                                                 ''
         50        SEND_VAR                                                 !0
         51        DO_ICALL                                         $16     
         52        SEND_VAR                                                 $16
         53        DO_ICALL                                                 
   12    54        INIT_FCALL                                               'var_dump'
         55        INIT_FCALL                                               'htmlspecialchars_decode'
         56        INIT_FCALL                                               'htmlspecialchars'
         57        SEND_VAR                                                 !0
         58        SEND_VAL                                                 4
         59        SEND_VAL                                                 'UTF-8'
         60        DO_ICALL                                         $18     
         61        SEND_VAR                                                 $18
         62        SEND_VAL                                                 0
         63        DO_ICALL                                         $19     
         64        SEND_VAR                                                 $19
         65        DO_ICALL                                                 
         66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.29 ms | 1400 KiB | 32 Q