3v4l.org

run code in 300+ PHP versions simultaneously
<?php class form { function st() { return "form"; } } class state { function st() { return "state"; } } interface aa { function run(form $form); } abstract class a implements aa{ function run(form $form, $a=null, $b=null) { var_dump($form->st()); echo "$a $b\n"; } } class b extends a { function run(form $form, state $state=null, $a=null, $b=null) { parent::run($form, $a, $b); var_dump($state->st()); } } $form = new form(); $state = new state(); $b = new b(); $b->run($form, $state, 1, 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p5Fe
function name:  (null)
number of ops:  18
compiled vars:  !0 = $form, !1 = $state, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'a'
   23     1        DECLARE_CLASS                                            'b', 'a'
   30     2        NEW                                              $3      'form'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   31     5        NEW                                              $6      'state'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   32     8        NEW                                              $9      'b'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
   33    11        INIT_METHOD_CALL                                         !2, 'run'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        SEND_VAL_EX                                              1
         15        SEND_VAL_EX                                              2
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

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

End of function st

End of class form.

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

End of function st

End of class state.

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

End of function run

End of class aa.

Class a:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p5Fe
function name:  run
number of ops:  14
compiled vars:  !0 = $form, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'st'
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
   19     8        ROPE_INIT                                     4  ~6      !1
          9        ROPE_ADD                                      1  ~6      ~6, '+'
         10        ROPE_ADD                                      2  ~6      ~6, !2
         11        ROPE_END                                      3  ~5      ~6, '%0A'
         12        ECHO                                                     ~5
   20    13      > RETURN                                                   null

End of function run

End of class a.

Class b:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6p5Fe
function name:  run
number of ops:  15
compiled vars:  !0 = $form, !1 = $state, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
   25     4        INIT_STATIC_METHOD_CALL                                  'run'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !2
          7        SEND_VAR_EX                                              !3
          8        DO_FCALL                                      0          
   26     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !1, 'st'
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   27    14      > RETURN                                                   null

End of function run

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.58 ms | 1015 KiB | 14 Q