3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = 'asdf&ddddd"fancy˝quotes˝'; echo htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, 'UTF-8') . "\n"; // Output: asdf&amp;ddddd&quot;fancyË echo htmlentities($text, ENT_COMPAT | ENT_HTML401, 'UTF-8') . "\n"; // Output: asdf&amp;ddddd&quot;fancy&Euml;quotes
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XYedd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'asdf%26ddddd%22fancy%CB%9Dquotes%CB%9D'
    4     1        INIT_FCALL                                                   'htmlspecialchars'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     2
          4        SEND_VAL                                                     'UTF-8'
          5        DO_ICALL                                             $2      
          6        CONCAT                                               ~3      $2, '%0A'
          7        ECHO                                                         ~3
    7     8        INIT_FCALL                                                   'htmlentities'
          9        SEND_VAR                                                     !0
         10        SEND_VAL                                                     2
         11        SEND_VAL                                                     'UTF-8'
         12        DO_ICALL                                             $4      
         13        CONCAT                                               ~5      $4, '%0A'
         14        ECHO                                                         ~5
    8    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
147.45 ms | 3067 KiB | 15 Q