3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class target { public static function startCrawler() { echo 'crawler state'; } } abstract class adapter { private static $class = ''; public function __construct($classname) { self::$class = $classname; } public static function __callStatic($method,$args) { echo 'start memory / time tracking'; call_user_func(array(self::$class,$method),$args); echo 'end memory / time tracking'; } } $obj = new adapter('target'); $obj::startCrawler();
based on JeLhQ
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3sX1L
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   9     1        NOP                                                      
  24     2        NEW                                              $3      :-6
         3        SEND_VAL_EX                                              'target'
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $3
  25     6        FETCH_CLASS                                 512  :6      !0
         7        INIT_STATIC_METHOD_CALL                                  $6, 'startCrawler'
         8        DO_FCALL                                      0          
         9      > RETURN                                                   1

Class target:
Function startcrawler:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3sX1L
function name:  startCrawler
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   ECHO                                                     'crawler+state'
   6     1      > RETURN                                                   null

End of function startcrawler

End of class target.

Class adapter:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3sX1L
function name:  __construct
number of ops:  5
compiled vars:  !0 = $classname
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   RECV                                             !0      
  14     1        FETCH_CLASS                                 513  :1      
         2        FETCH_W                      static member       $2      'class'
         3        ASSIGN                                                   $2, !0
  15     4      > RETURN                                                   null

End of function __construct

Function __callstatic:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/3sX1L
function name:  __callStatic
number of ops:  12
compiled vars:  !0 = $method, !1 = $args
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  16     0  E >   RECV                                             !0      
         1        RECV                                             !1      
  18     2        ECHO                                                     'start+memory+%2F+time+tracking'
  19     3        FETCH_CLASS                                 513  :2      
         4        FETCH_R                      static member       $3      'class'
         5        INIT_ARRAY                                       ~4      $3
         6        ADD_ARRAY_ELEMENT                                ~4      !0
         7        INIT_USER_CALL                                1          'call_user_func', ~4
         8        UNKNOWN                                                  !1
         9        DO_FCALL                                      0          
  20    10        ECHO                                                     'end+memory+%2F+time+tracking'
  21    11      > RETURN                                                   null

End of function __callstatic

End of class adapter.

Generated using Vulcan Logic Dumper, using php 7.3.0