3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ApiKey { public string $apiKey = 'abc123'; public function set(string $newKey): void { $this->apiKey = $newKey; } public function get(): string { return $this->apiKey; } } $config = new ApiKey(); var_dump($config->get()); $config->set('asdfasdf'); var_dump($config->get());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8U0T
function name:  (null)
number of ops:  17
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'ApiKey'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'get'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   22     8        INIT_METHOD_CALL                                         !0, 'set'
          9        SEND_VAL_EX                                              'asdfasdf'
         10        DO_FCALL                                      0          
   24    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !0, 'get'
         13        DO_FCALL                                      0  $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class ApiKey:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8U0T
function name:  set
number of ops:  4
compiled vars:  !0 = $newKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'apiKey'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function set

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8U0T
function name:  get
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'apiKey'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   15     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function get

End of class ApiKey.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.18 ms | 1396 KiB | 15 Q