3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Config { private static $config = array(); private function Get($name) { return static::$config[$name]; } public function Set($name, $value) { static::$config[$name] = $value; } } Config::Set('xxx', 'yyy'); print(Config::Get('xxx')."\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kmqV0
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'Config', 'Set'
          1        SEND_VAL                                                 'xxx'
          2        SEND_VAL                                                 'yyy'
          3        DO_FCALL                                      0          
   16     4        INIT_STATIC_METHOD_CALL                                  'Config', 'Get'
          5        SEND_VAL_EX                                              'xxx'
          6        DO_FCALL                                      0  $1      
          7        CONCAT                                           ~2      $1, '%0A'
          8        ECHO                                                     ~2
          9      > RETURN                                                   1

Class Config:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kmqV0
function name:  Get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        FETCH_STATIC_PROP_R          unknown             ~1      'config'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
    8     4*     > RETURN                                                   null

End of function get

Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kmqV0
function name:  Set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        FETCH_STATIC_PROP_W          global              $2      'config'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   12     5      > RETURN                                                   null

End of function set

End of class Config.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.26 ms | 1394 KiB | 13 Q