3v4l.org

run code in 300+ PHP versions simultaneously
<?php $STRING = "1&nbsp;2"; var_dump( htmlentities($STRING, ENT_QUOTES, ini_get('default_charset'), false), filter_var($STRING, FILTER_SANITIZE_FULL_SPECIAL_CHARS) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PStra
function name:  (null)
number of ops:  19
compiled vars:  !0 = $STRING
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%26nbsp%3B2'
    4     1        INIT_FCALL                                               'var_dump'
    5     2        INIT_FCALL                                               'htmlentities'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 3
          5        INIT_FCALL                                               'ini_get'
          6        SEND_VAL                                                 'default_charset'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 <false>
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
    6    12        INIT_FCALL                                               'filter_var'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 522
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
    7    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.6 ms | 1398 KiB | 21 Q