3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Super { public function foo($argument) { echo $argument; } } class Child extends Super { public function foo($argument, $second = 'bar') { parent::foo('bar'); } } $child = new Child(); $child->foo('x');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/af8dt
function name:  (null)
number of ops:  7
compiled vars:  !0 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Child'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        SEND_VAL_EX                                              'x'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Super:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/af8dt
function name:  foo
number of ops:  3
compiled vars:  !0 = $argument
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ECHO                                                     !0
    6     2      > RETURN                                                   null

End of function foo

End of class Super.

Class Child:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/af8dt
function name:  foo
number of ops:  6
compiled vars:  !0 = $argument, !1 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'bar'
   12     2        INIT_STATIC_METHOD_CALL                                  'foo'
          3        SEND_VAL_EX                                              'bar'
          4        DO_FCALL                                      0          
   13     5      > RETURN                                                   null

End of function foo

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.37 ms | 1393 KiB | 13 Q