3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "Love this shit"; ?> <script type="text/javascript"> var myvar = <?php echo json_encode($value); ?>; </script>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sjek2
function name:  (null)
number of ops:  8
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, 'Love+this+shit'
    2     1        ECHO                                                     '%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A++++var+myvar+%3D+'
    3     2        INIT_FCALL                                               'json_encode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
          6        ECHO                                                     '%3B%0A%3C%2Fscript%3E'
    4     7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.59 ms | 1394 KiB | 15 Q