3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { public function fooBar(Foo $foo) { $something = $foo->toArray(); } } class ChildClass extends ParentClass { public function fooBar(Foo $foo = null) { $something = $foo->toArray(); } } $caller = new ChildClass; $caller->foobar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FSXgR
function name:  (null)
number of ops:  6
compiled vars:  !0 = $caller
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'ChildClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'foobar'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class ParentClass:
Function foobar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FSXgR
function name:  fooBar
number of ops:  5
compiled vars:  !0 = $foo, !1 = $something
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         !0, 'toArray'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !1, $2
    8     4      > RETURN                                                   null

End of function foobar

End of class ParentClass.

Class ChildClass:
Function foobar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FSXgR
function name:  fooBar
number of ops:  5
compiled vars:  !0 = $foo, !1 = $something
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV_INIT                                        !0      null
   15     1        INIT_METHOD_CALL                                         !0, 'toArray'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !1, $2
   16     4      > RETURN                                                   null

End of function foobar

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.97 ms | 1013 KiB | 13 Q