3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = mb_convert_encoding('asdf&ddddd"fancy˝quotes˝', 'UTF-7', 'UTF-8'); 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/7HKts
function name:  (null)
number of ops:  21
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'mb_convert_encoding'
          1        SEND_VAL                                                 'asdf%26ddddd%22fancy%CB%9Dquotes%CB%9D'
          2        SEND_VAL                                                 'UTF-7'
          3        SEND_VAL                                                 'UTF-8'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    4     6        INIT_FCALL                                               'htmlspecialchars'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 2
          9        SEND_VAL                                                 'UTF-8'
         10        DO_ICALL                                         $3      
         11        CONCAT                                           ~4      $3, '%0A'
         12        ECHO                                                     ~4
    7    13        INIT_FCALL                                               'htmlentities'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 2
         16        SEND_VAL                                                 'UTF-8'
         17        DO_ICALL                                         $5      
         18        CONCAT                                           ~6      $5, '%0A'
         19        ECHO                                                     ~6
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.93 ms | 1395 KiB | 19 Q