3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public function yes() { return 'hello'; } } class Y extends X { public function yes() { return parent::yes().' plus more'; } } $y = new Y(); echo $y->yes();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9A3kR
function name:  (null)
number of ops:  7
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Y'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'yes'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class X:
Function yes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9A3kR
function name:  yes
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'hello'
    8     1*     > RETURN                                                   null

End of function yes

End of class X.

Class Y:
Function yes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9A3kR
function name:  yes
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'yes'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '+plus+more'
          3      > RETURN                                                   ~1
   16     4*     > RETURN                                                   null

End of function yes

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.71 ms | 1393 KiB | 13 Q