3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface a { public function aaa(); } interface b extends a { public function bbb(); } class aa implements a { public function aaa() { echo 'aa'; } } class bb implements b { public function aaa() { echo 'aa'; } public function bbb() { echo 'bb'; } } echo 'aa' . "\n"; echo 'aa:aaa' . "\n"; $aa = new aa(); $aa->aaa() . "\n"; echo "\n\n"; echo 'bb' . "\n"; $bb = new bbb(); echo 'bb:aa' . "\n"; $bb->aaa() . "\n"; echo 'bb:bb' . "\n"; $bb->bbb();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F2tMG
function name:  (null)
number of ops:  26
compiled vars:  !0 = $aa, !1 = $bb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'b'
   13     1        DECLARE_CLASS                                            'aa'
   20     2        DECLARE_CLASS                                            'bb'
   30     3        ECHO                                                     'aa%0A'
   31     4        ECHO                                                     'aa%3Aaaa%0A'
   32     5        NEW                                              $2      'aa'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   33     8        INIT_METHOD_CALL                                         !0, 'aaa'
          9        DO_FCALL                                      0  $5      
         10        CONCAT                                           ~6      $5, '%0A'
         11        FREE                                                     ~6
   34    12        ECHO                                                     '%0A%0A'
   36    13        ECHO                                                     'bb%0A'
   37    14        NEW                                              $7      'bbb'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !1, $7
   38    17        ECHO                                                     'bb%3Aaa%0A'
   39    18        INIT_METHOD_CALL                                         !1, 'aaa'
         19        DO_FCALL                                      0  $10     
         20        CONCAT                                           ~11     $10, '%0A'
         21        FREE                                                     ~11
   40    22        ECHO                                                     'bb%3Abb%0A'
   41    23        INIT_METHOD_CALL                                         !1, 'bbb'
         24        DO_FCALL                                      0          
         25      > RETURN                                                   1

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

End of function aaa

End of class a.

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

End of function bbb

End of class b.

Class aa:
Function aaa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F2tMG
function name:  aaa
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'aa'
   17     1      > RETURN                                                   null

End of function aaa

End of class aa.

Class bb:
Function aaa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F2tMG
function name:  aaa
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     'aa'
   23     1      > RETURN                                                   null

End of function aaa

Function bbb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F2tMG
function name:  bbb
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ECHO                                                     'bb'
   27     1      > RETURN                                                   null

End of function bbb

End of class bb.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.71 ms | 1399 KiB | 13 Q