3v4l.org

run code in 300+ PHP versions simultaneously
<?php function init_vera_htmlspecialchars() { if (version_compare(PHP_VERSION, '5.4.0') >= 0) { function vera_htmlspecialchars($string, $flags = ENT_COMPAT , $encoding = 'ISO-8869-2', $doubleEncode = true) { return htmlspecialchars($string, $flags, $encoding, $doubleEncode); } } elseif (version_compare(PHP_VERSION, '5.2.3') >= 0) { function vera_htmlspecialchars($string, $flags = ENT_COMPAT, $encoding = 'ISO-8869-2', $doubleEncode = true) { return htmlspecialchars($string, $flags, $encoding, $doubleEncode); } } else { function vera_htmlspecialchars($string, $flags = ENT_COMPAT, $encoding = 'ISO-8869-2', $doubleEncode = true) { return htmlspecialchars($string, $flags, $encoding); } } }; init_vera_htmlspecialchars(); for ($i=0; $i<100000; $i++) { $str = vera_htmlspecialchars('asdf&<>;\'"',ENT_QUOTES,'UTF-8'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/LZJgE
function name:  (null)
number of ops:  14
compiled vars:  !0 = $i, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'init_vera_htmlspecialchars'
          1        DO_FCALL                                      0          
   22     2        ASSIGN                                                   !0, 0
          3      > JMP                                                      ->11
   23     4    >   INIT_FCALL_BY_NAME                                       'vera_htmlspecialchars'
          5        SEND_VAL_EX                                              'asdf%26%3C%3E%3B%27%22'
          6        SEND_VAL_EX                                              3
          7        SEND_VAL_EX                                              'UTF-8'
          8        DO_FCALL                                      0  $4      
          9        ASSIGN                                                   !1, $4
   22    10        PRE_INC                                                  !0
         11    >   IS_SMALLER                                               !0, 100000
         12      > JMPNZ                                                    ~7, ->4
   24    13    > > RETURN                                                   1

Function init_vera_htmlspecialchars:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LZJgE
function name:  init_vera_htmlspecialchars
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '5.4.0'
          3        DO_ICALL                                         $0      
          4        IS_SMALLER_OR_EQUAL                                      0, $0
          5      > JMPZ                                                     ~1, ->8
    6     6    >   DECLARE_FUNCTION                                         'vera_htmlspecialchars'
    8     7      > JMP                                                      ->17
    9     8    >   INIT_FCALL                                               'version_compare'
          9        SEND_VAL                                                 '8.0.0'
         10        SEND_VAL                                                 '5.2.3'
         11        DO_ICALL                                         $2      
         12        IS_SMALLER_OR_EQUAL                                      0, $2
         13      > JMPZ                                                     ~3, ->16
   10    14    >   DECLARE_FUNCTION                                         'vera_htmlspecialchars'
   12    15      > JMP                                                      ->17
   14    16    >   DECLARE_FUNCTION                                         'vera_htmlspecialchars'
   19    17    > > RETURN                                                   null

End of function init_vera_htmlspecialchars

Function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LZJgE
function name:  vera_htmlspecialchars
number of ops:  12
compiled vars:  !0 = $string, !1 = $flags, !2 = $encoding, !3 = $doubleEncode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
          2        RECV_INIT                                        !2      'ISO-8869-2'
          3        RECV_INIT                                        !3      <true>
    7     4        INIT_FCALL                                               'htmlspecialchars'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $4      
         10      > RETURN                                                   $4
    8    11*     > RETURN                                                   null

End of function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A6%240

Function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LZJgE
function name:  vera_htmlspecialchars
number of ops:  12
compiled vars:  !0 = $string, !1 = $flags, !2 = $encoding, !3 = $doubleEncode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
          2        RECV_INIT                                        !2      'ISO-8869-2'
          3        RECV_INIT                                        !3      <true>
   11     4        INIT_FCALL                                               'htmlspecialchars'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $4      
         10      > RETURN                                                   $4
   12    11*     > RETURN                                                   null

End of function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A10%241

Function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LZJgE
function name:  vera_htmlspecialchars
number of ops:  11
compiled vars:  !0 = $string, !1 = $flags, !2 = $encoding, !3 = $doubleEncode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
          2        RECV_INIT                                        !2      'ISO-8869-2'
          3        RECV_INIT                                        !3      <true>
   15     4        INIT_FCALL                                               'htmlspecialchars'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $4      
          9      > RETURN                                                   $4
   16    10*     > RETURN                                                   null

End of function %00vera_htmlspecialchars%2Fin%2FLZJgE%3A14%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.04 ms | 1407 KiB | 18 Q