3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'hey good day'; $text = htmlspecialchars($text); echo "<script>alert('". json_encode($text) ."');</script>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ObCYA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'hey%0Agood+day'
    5     1        INIT_FCALL                                               'htmlspecialchars'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    6     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        CONCAT                                           ~5      '%3Cscript%3Ealert%28%27', $4
          9        CONCAT                                           ~6      ~5, '%27%29%3B%3C%2Fscript%3E'
         10        ECHO                                                     ~6
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.79 ms | 1398 KiB | 17 Q