3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SomeService { private OldToNewConverterInterface $converter; public function __construct(OldToNewConverterInterface $converter) { $this->converter = $converter; } public function doSomethingWithOld(OldInterface $old): void { // Do stuff // At some point, convert $new = $this->converter->convert($old); // Do some other stuff } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3hdaI
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                       1

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

End of function __construct

Function dosomethingwithold:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3hdaI
function name:  doSomethingWithOld
number of ops:  7
compiled vars:  !0 = $old, !1 = $new
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   17     1        FETCH_OBJ_R                                          ~2      'converter'
          2        INIT_METHOD_CALL                                             ~2, 'convert'
          3        SEND_VAR_EX                                                  !0
          4        DO_FCALL                                          0  $3      
          5        ASSIGN                                                       !1, $3
   20     6      > RETURN                                                       null

End of function dosomethingwithold

End of class SomeService.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.27 ms | 1985 KiB | 13 Q