3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php // Set a cookie named "abc" with value "abc" that expires in 1 hour setcookie("abc", "abc", time() + 3600); // Check if the cookie 'abc' is set and display message accordingly if (isset($_COOKIE['abc'])) { echo "Hello, visiting again! Cookie value: " . $_COOKIE['abc']; } else { echo "Your first visit."; } ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vGgJ5
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%0A'
    7     1        INIT_FCALL                                               'setcookie'
          2        SEND_VAL                                                 'abc'
          3        SEND_VAL                                                 'abc'
          4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $0      
          6        ADD                                              ~1      $0, 3600
          7        SEND_VAL                                                 ~1
          8        DO_ICALL                                                 
   10     9        FETCH_IS                                         ~3      '_COOKIE'
         10        ISSET_ISEMPTY_DIM_OBJ                         0          ~3, 'abc'
         11      > JMPZ                                                     ~4, ->17
   11    12    >   FETCH_R                      global              ~5      '_COOKIE'
         13        FETCH_DIM_R                                      ~6      ~5, 'abc'
         14        CONCAT                                           ~7      'Hello%2C+visiting+again%21+Cookie+value%3A+', ~6
         15        ECHO                                                     ~7
   10    16      > JMP                                                      ->18
   13    17    >   ECHO                                                     'Your+first+visit.'
   16    18    >   ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   18    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.07 ms | 1011 KiB | 15 Q