3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Logger{ public static function log(){ echo 'fuck'; } } class Test{ protected $logger; public function setLogger($logger){ $this->logger = $logger; } public function fire(){ $this->logger->log(); } } $test = new Test(); $test->setLogger(new Logger()); $test->fire();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kgRE
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'setLogger'
          4        NEW                                              $4      'Logger'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   21     8        INIT_METHOD_CALL                                         !0, 'fire'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Logger:
Function log:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kgRE
function name:  log
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'fuck'
    5     1      > RETURN                                                   null

End of function log

End of class Logger.

Class Test:
Function setlogger:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kgRE
function name:  setLogger
number of ops:  4
compiled vars:  !0 = $logger
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_OBJ                                               'logger'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function setlogger

Function fire:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kgRE
function name:  fire
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'logger'
          1        INIT_METHOD_CALL                                         ~0, 'log'
          2        DO_FCALL                                      0          
   16     3      > RETURN                                                   null

End of function fire

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.96 ms | 1386 KiB | 13 Q