3v4l.org

run code in 300+ PHP versions simultaneously
<html> <title>Status</title> <body> <form action="altaltstatus.php" method="post"> <input type="radio" name="status" value="Here"> Here<br> <input type="radio" name="status" value="Away"> Away<br> <input type="submit" name="submit" value="Update Status" /> </form> <?php if(isset($_POST['submit'])) { $status = $_POST['status']; if (in_array($status, ['Here','Away'])) { file_put_contents(__DIR__.'/status.txt',$status); } else { exit(1); } } ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
filename:       /in/85XYd
function name:  (null)
number of ops:  17
compiled vars:  !0 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Ctitle%3EStatus%3C%2Ftitle%3E%0A%3Cbody%3E%0A%3Cform+action%3D%22altaltstatus.php%22+method%3D%22post%22%3E%0A++%3Cinput+type%3D%22radio%22+name%3D%22status%22+value%3D%22Here%22%3E+Here%3Cbr%3E%0A++%3Cinput+type%3D%22radio%22+name%3D%22status%22+value%3D%22Away%22%3E+Away%3Cbr%3E%0A++%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Update+Status%22+%2F%3E%0A%3C%2Fform%3E%0A'
   10     1        FETCH_IS                                         ~1      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, 'submit'
          3      > JMPZ                                                     ~2, ->15
   11     4    >   FETCH_R                      global              ~3      '_POST'
          5        FETCH_DIM_R                                      ~4      ~3, 'status'
          6        ASSIGN                                                   !0, ~4
   13     7        IN_ARRAY                                                 !0, <array>
          8      > JMPZ                                                     ~6, ->14
   14     9    >   INIT_FCALL                                               'file_put_contents'
         10        SEND_VAL                                                 '%2Fin%2Fstatus.txt'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > JMP                                                      ->15
   17    14    > > EXIT                                                     1
   21    15    >   ECHO                                                     '%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   22    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.97 ms | 1395 KiB | 15 Q