3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ActionInterface { public function process(); } class Action implements ActionInterface { public function process() { if (static::class !== self::class) { $result = static::process(1, 2, 3); } else { $this->a = 1; } } } class SuperAction extends Action { public function process($a = null, $b = null, $c = null) { $result = parent::process(); var_dump($a, $b, $c); } } $c = new SuperAction(); $c->process();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DiAIb
function name:  (null)
number of ops:  8
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'action'
   17     1        DECLARE_CLASS                                            'superaction', 'action'
   24     2        NEW                                              $1      'SuperAction'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   25     5        INIT_METHOD_CALL                                         !0, 'process'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function process

End of class ActionInterface.

Class Action:
Function process:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DiAIb
function name:  process
number of ops:  13
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CLASS_NAME                                 ~1      
          1        IS_NOT_IDENTICAL                                         ~1, 'Action'
          2      > JMPZ                                                     ~2, ->10
   10     3    >   INIT_STATIC_METHOD_CALL                                  'process'
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              2
          6        SEND_VAL_EX                                              3
          7        DO_FCALL                                      0  $3      
          8        ASSIGN                                                   !0, $3
          9      > JMP                                                      ->12
   12    10    >   ASSIGN_OBJ                                               'a'
         11        OP_DATA                                                  1
   14    12    > > RETURN                                                   null

End of function process

End of class Action.

Class SuperAction:
Function process:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DiAIb
function name:  process
number of ops:  12
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
   19     3        INIT_STATIC_METHOD_CALL                                  'process'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !3, $4
   20     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   21    11      > RETURN                                                   null

End of function process

End of class SuperAction.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.63 ms | 1400 KiB | 15 Q