3v4l.org

run code in 500+ PHP versions simultaneously
<?php setcookie( 'test-php8', 'value-php8', time()+3600, httponly: true ); // только для php8 setcookie( 'test-php7', 'value-php7', time()+3600, '', '', false, true ); setcookie( 'test-arr', 'val-arr', ['expires'=>time()+3600, 'httponly'=> true] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcVdt
function name:  (null)
number of ops:  33
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'setcookie'
    4     1        SEND_VAL                                                     'test-php8'
    5     2        SEND_VAL                                                     'value-php8'
    6     3        INIT_FCALL                                                   'time'
          4        DO_ICALL                                             $0      
          5        ADD                                                  ~1      $0, 3600
          6        SEND_VAL                                                     ~1
    7     7        SEND_VAL                                                     <true>
          8        CHECK_UNDEF_ARGS                                             
    3     9        DO_ICALL                                                     
   10    10        INIT_FCALL                                                   'setcookie'
   11    11        SEND_VAL                                                     'test-php7'
   12    12        SEND_VAL                                                     'value-php7'
   13    13        INIT_FCALL                                                   'time'
         14        DO_ICALL                                             $3      
         15        ADD                                                  ~4      $3, 3600
         16        SEND_VAL                                                     ~4
   14    17        SEND_VAL                                                     ''
         18        SEND_VAL                                                     ''
         19        SEND_VAL                                                     <false>
   15    20        SEND_VAL                                                     <true>
   10    21        DO_ICALL                                                     
   18    22        INIT_FCALL                                                   'setcookie'
   19    23        SEND_VAL                                                     'test-arr'
   20    24        SEND_VAL                                                     'val-arr'
   21    25        INIT_FCALL                                                   'time'
         26        DO_ICALL                                             $6      
         27        ADD                                                  ~7      $6, 3600
         28        INIT_ARRAY                                           ~8      ~7, 'expires'
         29        ADD_ARRAY_ELEMENT                                    ~8      <true>, 'httponly'
         30        SEND_VAL                                                     ~8
   18    31        DO_ICALL                                                     
   22    32      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.15 ms | 1094 KiB | 15 Q