3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'Premium serviço Personal - 1 mês'; $trunc = substr($input, 0, 32); var_dump($input); var_dump($trunc); var_dump( iconv_substr($input, 0, 32) ); var_dump( iconv_substr($input, 0, 32, 'UTF-8') ); var_dump( htmlspecialchars_decode(htmlspecialchars($trunc, 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/kJEdC
function name:  (null)
number of ops:  43
compiled vars:  !0 = $input, !1 = $trunc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Premium+servi%C3%A7o+Personal+-+1+m%C3%AAs'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 32
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    9    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL_BY_NAME                                       'iconv_substr'
         15        SEND_VAR_EX                                              !0
         16        SEND_VAL_EX                                              0
         17        SEND_VAL_EX                                              32
         18        DO_FCALL                                      0  $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL_BY_NAME                                       'iconv_substr'
         23        SEND_VAR_EX                                              !0
         24        SEND_VAL_EX                                              0
         25        SEND_VAL_EX                                              32
         26        SEND_VAL_EX                                              'UTF-8'
         27        DO_FCALL                                      0  $9      
         28        SEND_VAR                                                 $9
         29        DO_ICALL                                                 
   11    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'htmlspecialchars_decode'
         32        INIT_FCALL                                               'htmlspecialchars'
         33        SEND_VAR                                                 !1
         34        SEND_VAL                                                 4
         35        SEND_VAL                                                 'UTF-8'
         36        DO_ICALL                                         $11     
         37        SEND_VAR                                                 $11
         38        SEND_VAL                                                 0
         39        DO_ICALL                                         $12     
         40        SEND_VAR                                                 $12
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.17 ms | 1396 KiB | 24 Q