3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct($value) { $this->bar = $value; } public function debugBar(Foo $object) { //echo $object->bar, "\n"; } } class Baz extends Foo { } $o1 = new Foo(1); //$o2 = new Baz(2); //$o2->debugBar($o1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lSvV
function name:  (null)
number of ops:  5
compiled vars:  !0 = $o1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Foo'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   24     4      > RETURN                                                   1

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

End of function __construct

Function debugbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lSvV
function name:  debugBar
number of ops:  2
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   14     1      > RETURN                                                   null

End of function debugbar

End of class Foo.

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

End of function __construct

Function debugbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lSvV
function name:  debugBar
number of ops:  2
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   14     1      > RETURN                                                   null

End of function debugbar

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.21 ms | 1395 KiB | 13 Q