3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL & E_STRICT); ini_set('display_errors', 'on'); interface ConfigInterface { public static function get($key); public static function set($key, $value); public static function clear(); } class Config implements ConfigInterface { public static $data = []; public static function get($key) { return self::$data[$key]; } public static function set($key, $value) { self::$data[$key] = $value; } public static function clear() { self::$data = []; } } $config = new Config; $config->set('alma', 'banan'); echo $config->get('alma');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkCGV
function name:  (null)
number of ops:  20
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 2048
          2        DO_ICALL                                                 
          3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 'on'
          6        DO_ICALL                                                 
    9     7        DECLARE_CLASS                                            'config'
   16     8        NEW                                              $3      'Config'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $3
   17    11        INIT_METHOD_CALL                                         !0, 'set'
         12        SEND_VAL_EX                                              'alma'
         13        SEND_VAL_EX                                              'banan'
         14        DO_FCALL                                      0          
   18    15        INIT_METHOD_CALL                                         !0, 'get'
         16        SEND_VAL_EX                                              'alma'
         17        DO_FCALL                                      0  $7      
         18        ECHO                                                     $7
         19      > RETURN                                                   1

Class ConfigInterface:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkCGV
function name:  get
number of ops:  2
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1      > 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/HkCGV
function name:  set
number of ops:  3
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function set

Function clear:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkCGV
function name:  clear
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function clear

End of class ConfigInterface.

Class Config:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkCGV
function name:  get
number of ops:  5
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        FETCH_STATIC_PROP_R          unknown             ~1      'data'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
          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/HkCGV
function name:  set
number of ops:  6
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_STATIC_PROP_W          global              $2      'data'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
          5      > RETURN                                                   null

End of function set

Function clear:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkCGV
function name:  clear
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN_STATIC_PROP                                       'data'
          1        OP_DATA                                                  <array>
          2      > RETURN                                                   null

End of function clear

End of class Config.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.02 ms | 1400 KiB | 17 Q