3v4l.org

run code in 500+ PHP versions simultaneously
<?php $params = [ "samesite" => "Lax", "expires_or_options" => time() + 3600, "path" => "/", "domain" => "", "secure" => false, "httponly" => true, ]; function fakeSetCookie( string $name, string $value = "", int $expires_or_options = 0, string $path = "", string $domain = "", bool $secure = false, bool $httponly = false, string $samesite = "Strict", ) { var_dump([ "name" => $name, "value" => $value, "expires_or_options" => $expires_or_options, "path" => $path, "domain" => $domain, "secure" => $secure, "httponly" => $httponly, "samesite" => $samesite, ]); } fakeSetCookie("testName", "testValue", ...$params);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kD27a
function name:  (null)
number of ops:  17
compiled vars:  !0 = $params
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                           ~1      'Lax', 'samesite'
    5     1        INIT_FCALL                                                   'time'
          2        DO_ICALL                                             $2      
          3        ADD                                                  ~3      $2, 3600
          4        ADD_ARRAY_ELEMENT                                    ~1      ~3, 'expires_or_options'
    6     5        ADD_ARRAY_ELEMENT                                    ~1      '%2F', 'path'
    7     6        ADD_ARRAY_ELEMENT                                    ~1      '', 'domain'
    4     7        ADD_ARRAY_ELEMENT                                    ~1      <false>, 'secure'
          8        ADD_ARRAY_ELEMENT                                    ~1      <true>, 'httponly'
    3     9        ASSIGN                                                       !0, ~1
   34    10        INIT_FCALL                                                   'fakesetcookie'
         11        SEND_VAL                                                     'testName'
         12        SEND_VAL                                                     'testValue'
         13        SEND_UNPACK                                                  !0
         14        CHECK_UNDEF_ARGS                                             
         15        DO_FCALL                                          0          
         16      > RETURN                                                       1

Function fakesetcookie:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kD27a
function name:  fakeSetCookie
number of ops:  20
compiled vars:  !0 = $name, !1 = $value, !2 = $expires_or_options, !3 = $path, !4 = $domain, !5 = $secure, !6 = $httponly, !7 = $samesite
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   14     1        RECV_INIT                                            !1      ''
   15     2        RECV_INIT                                            !2      0
   16     3        RECV_INIT                                            !3      ''
   17     4        RECV_INIT                                            !4      ''
   18     5        RECV_INIT                                            !5      <false>
   19     6        RECV_INIT                                            !6      <false>
   20     7        RECV_INIT                                            !7      'Strict'
   22     8        INIT_FCALL                                                   'var_dump'
   23     9        INIT_ARRAY                                           ~8      !0, 'name'
   24    10        ADD_ARRAY_ELEMENT                                    ~8      !1, 'value'
   25    11        ADD_ARRAY_ELEMENT                                    ~8      !2, 'expires_or_options'
   26    12        ADD_ARRAY_ELEMENT                                    ~8      !3, 'path'
   27    13        ADD_ARRAY_ELEMENT                                    ~8      !4, 'domain'
   28    14        ADD_ARRAY_ELEMENT                                    ~8      !5, 'secure'
   29    15        ADD_ARRAY_ELEMENT                                    ~8      !6, 'httponly'
   30    16        ADD_ARRAY_ELEMENT                                    ~8      !7, 'samesite'
         17        SEND_VAL                                                     ~8
   22    18        DO_ICALL                                                     
   32    19      > RETURN                                                       null

End of function fakesetcookie

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.12 ms | 3489 KiB | 16 Q