3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Core { protected static $_instance = null; public static function __callStatic($method, $args) { if (static::$_instance === null) { static::$_instance = new static; } return call_user_func_array(array(static::$_instance, $method), $args); } } class ConstructCore extends Core { public function getModulesManager() { return 'manager'; } } var_dump(ConstructCore::getModulesManager());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O6ve4
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'ConstructCore', 'getModulesManager'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Class Core:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/O6ve4
function name:  __callStatic
number of ops:  18
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        FETCH_STATIC_PROP_R          unknown             ~2      '_instance'
          3        TYPE_CHECK                                    2          ~2
          4      > JMPZ                                                     ~3, ->9
   10     5    >   NEW                          static              $5      
          6        DO_FCALL                                      0          
          7        ASSIGN_STATIC_PROP                                       '_instance'
          8        OP_DATA                                                  $5
   13     9    >   FETCH_STATIC_PROP_R          unknown             ~7      '_instance'
         10        INIT_ARRAY                                       ~8      ~7
         11        ADD_ARRAY_ELEMENT                                ~8      !0
         12        INIT_USER_CALL                                0          'call_user_func_array', ~8
         13        SEND_ARRAY                                               !1
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0  $9      
         16      > RETURN                                                   $9
   14    17*     > RETURN                                                   null

End of function __callstatic

End of class Core.

Class ConstructCore:
Function getmodulesmanager:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O6ve4
function name:  getModulesManager
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                   'manager'
   22     1*     > RETURN                                                   null

End of function getmodulesmanager

Function __callstatic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/O6ve4
function name:  __callStatic
number of ops:  18
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        FETCH_STATIC_PROP_R          unknown             ~2      '_instance'
          3        TYPE_CHECK                                    2          ~2
          4      > JMPZ                                                     ~3, ->9
   10     5    >   NEW                          static              $5      
          6        DO_FCALL                                      0          
          7        ASSIGN_STATIC_PROP                                       '_instance'
          8        OP_DATA                                                  $5
   13     9    >   FETCH_STATIC_PROP_R          unknown             ~7      '_instance'
         10        INIT_ARRAY                                       ~8      ~7
         11        ADD_ARRAY_ELEMENT                                ~8      !0
         12        INIT_USER_CALL                                0          'call_user_func_array', ~8
         13        SEND_ARRAY                                               !1
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0  $9      
         16      > RETURN                                                   $9
   14    17*     > RETURN                                                   null

End of function __callstatic

End of class ConstructCore.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.01 ms | 1400 KiB | 15 Q