3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = $_POST["item"]; } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> </head> <body> <form method="post" action=""/> <input type="text" name="item"> <input type="submit" value="Yes, Add to Cart"> </form> <?php echo "<br/><br/><br/>" . "<b>".$name . "</b>"; ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/XfYcL
function name:  (null)
number of ops:  13
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_R                      global              ~1      '_SERVER'
          1        FETCH_DIM_R                                      ~2      ~1, 'REQUEST_METHOD'
          2        IS_EQUAL                                                 ~2, 'POST'
          3      > JMPZ                                                     ~3, ->7
    3     4    >   FETCH_R                      global              ~4      '_POST'
          5        FETCH_DIM_R                                      ~5      ~4, 'item'
          6        ASSIGN                                                   !0, ~5
    6     7    >   ECHO                                                     '%0A%3C%21doctype+html%3E%0A%3Chtml+lang%3D%22en%22%3E%0A%3Chead%3E%0A%3Cmeta+charset%3D%22utf-8%22%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cform+method%3D%22post%22+action%3D%22%22%2F%3E%0A%3Cinput+type%3D%22text%22+name%3D%22item%22%3E%0A%3Cinput+type%3D%22submit%22+value%3D%22Yes%2C+Add+to+Cart%22%3E%0A%3C%2Fform%3E%0A'
   18     8        CONCAT                                           ~7      '%3Cbr%2F%3E%3Cbr%2F%3E%3Cbr%2F%3E%3Cb%3E', !0
          9        CONCAT                                           ~8      ~7, '%3C%2Fb%3E'
         10        ECHO                                                     ~8
   20    11        ECHO                                                     '%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   21    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.13 ms | 1397 KiB | 13 Q