3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<_HTML 'single quotes' "double quotes" _HTML; echo 'no flags:', PHP_EOL, htmlspecialchars($str), PHP_EOL, PHP_EOL, 'with flags but nothing for quotes:', PHP_EOL, htmlspecialchars($str, ENT_HTML5);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hl2tk
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%27single+quotes%27%0A%22double+quotes%22'
    8     1        ECHO                                                     'no+flags%3A'
          2        ECHO                                                     '%0A'
          3        INIT_FCALL                                               'htmlspecialchars'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7        ECHO                                                     '%0A'
          8        ECHO                                                     '%0A'
    9     9        ECHO                                                     'with+flags+but+nothing+for+quotes%3A'
         10        ECHO                                                     '%0A'
         11        INIT_FCALL                                               'htmlspecialchars'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 48
         14        DO_ICALL                                         $3      
         15        ECHO                                                     $3
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.88 ms | 1004 KiB | 14 Q