3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('APP_CHARSET', 'UTF-8'); function hq($input) { return htmlspecialchars($input, ENT_QUOTES, APP_CHARSET, false); } echo 'var x = tTest|', hq('C:\\hi') ,'|test"';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Fvb7
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'APP_CHARSET'
          2        SEND_VAL                                                 'UTF-8'
          3        DO_ICALL                                                 
    6     4        ECHO                                                     'var+x+%3D+tTest%7C'
          5        INIT_FCALL                                               'hq'
          6        SEND_VAL                                                 'C%3A%5Chi'
          7        DO_FCALL                                      0  $1      
          8        ECHO                                                     $1
          9        ECHO                                                     '%7Ctest%22'
         10      > RETURN                                                   1

Function hq:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Fvb7
function name:  hq
number of ops:  10
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'htmlspecialchars'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        FETCH_CONSTANT                                   ~1      'APP_CHARSET'
          5        SEND_VAL                                                 ~1
          6        SEND_VAL                                                 <false>
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
    5     9*     > RETURN                                                   null

End of function hq

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.48 ms | 1397 KiB | 18 Q