3v4l.org

run code in 500+ PHP versions simultaneously
<?php class CookieType { public string $samesite = "Lax"; public int $expires_or_options { get { return time() + 3600; } } public string $path = "/"; public string $domain = ""; public bool $secure = false; public bool $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", ...new CookieType());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNjSX
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   34     0  E >   INIT_FCALL                                                   'fakesetcookie'
          1        SEND_VAL                                                     'testName'
          2        SEND_VAL                                                     'testValue'
          3        NEW                                                  $0      'CookieType'
          4        DO_FCALL                                          0          
          5        SEND_UNPACK                                                  $0
          6        CHECK_UNDEF_ARGS                                             
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

Function fakesetcookie:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNjSX
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

Class CookieType: [no user functions]
Property expires_or_options:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lNjSX
function name:  $expires_or_options::get
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'time'
          1        DO_ICALL                                             $0      
          2        ADD                                                  ~1      $0, 3600
          3        VERIFY_RETURN_TYPE                                           ~1
          4      > RETURN                                                       ~1
          5*       VERIFY_RETURN_TYPE                                           
          6*     > RETURN                                                       null

End of property expires_or_options:

Property expires_or_options:
End of property expires_or_options:

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161 ms | 1431 KiB | 16 Q