3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Log; interface TestInterface { public function log(); } use Log\TestInterface; class Handler implements TestInterface { public function log() { echo func_get_arg(0); } } use Log\Handler; class Log { public function __construct(TestInterface $handler) { $handler->log('test'); } } $obj = new Log(new Handler());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oROik
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'log%5Chandler'
   27     1        NEW                                              $1      'Log%5CLog'
          2        NEW                                              $2      'Log%5CHandler'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
          7      > RETURN                                                   1

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

End of function log

End of class Log\TestInterface.

Class Log\Handler:
Function log:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oROik
function name:  log
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_NS_FCALL_BY_NAME                                    'Log%5Cfunc_get_arg'
          1        SEND_VAL_EX                                              0
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   15     4      > RETURN                                                   null

End of function log

End of class Log\Handler.

Class Log\Log:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oROik
function name:  __construct
number of ops:  5
compiled vars:  !0 = $handler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        INIT_METHOD_CALL                                         !0, 'log'
          2        SEND_VAL_EX                                              'test'
          3        DO_FCALL                                      0          
   24     4      > RETURN                                                   null

End of function __construct

End of class Log\Log.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.39 ms | 1396 KiB | 15 Q