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( mb_substr($input, 0, 32) ); 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/VOG6h
function name:  (null)
number of ops:  34
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                                               'mb_substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 0
         17        SEND_VAL                                                 32
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'htmlspecialchars_decode'
         23        INIT_FCALL                                               'htmlspecialchars'
         24        SEND_VAR                                                 !1
         25        SEND_VAL                                                 4
         26        SEND_VAL                                                 'UTF-8'
         27        DO_ICALL                                         $9      
         28        SEND_VAR                                                 $9
         29        SEND_VAL                                                 0
         30        DO_ICALL                                         $10     
         31        SEND_VAR                                                 $10
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.8 ms | 1401 KiB | 23 Q