3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "I <3 your website, it's awesome! Great job, fast, safe and secure! :D"; if (mb_strlen($input) <1) { throw new Exception('Bad input. Try again'); } $output = $input; $output = htmlspecialchars($output, ENT_QUOTES | ENT_HTML5 | ENT_DISALLOWED | ENT_SUBSTITUTE, 'UTF-8'); echo $output;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z5mfC
function name:  (null)
number of ops:  19
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'I+%3C3+your+website%2C+it%27s+awesome%21+Great+job%2C+fast%2C+safe+and+secure%21+%3AD'
    5     1        INIT_FCALL                                               'mb_strlen'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        IS_SMALLER                                               $3, 1
          5      > JMPZ                                                     ~4, ->10
    6     6    >   NEW                                              $5      'Exception'
          7        SEND_VAL_EX                                              'Bad+input.+Try+again'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $5
    9    10    >   ASSIGN                                                   !1, !0
   11    11        INIT_FCALL                                               'htmlspecialchars'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 187
         14        SEND_VAL                                                 'UTF-8'
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !1, $8
   14    17        ECHO                                                     !1
   15    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.72 ms | 1399 KiB | 17 Q