3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function foo(...$args) : self; } class B implements A { public function foo(...$args) : self { foreach ($args as $arg) { echo $arg."\n"; } } } $x = new B; $x->foo(1, 2, 3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XbtXf
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'b'
   17     1        NEW                                              $1      'B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   18     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        SEND_VAL_EX                                              1
          6        SEND_VAL_EX                                              2
          7        SEND_VAL_EX                                              3
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function foo

End of class A.

Class B:
Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/XbtXf
function name:  foo
number of ops:  9
compiled vars:  !0 = $args, !1 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_VARIADIC                                    !0      
   11     1      > FE_RESET_R                                       $2      !0, ->6
          2    > > FE_FETCH_R                                               $2, !1, ->6
   12     3    >   CONCAT                                           ~3      !1, '%0A'
          4        ECHO                                                     ~3
   11     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $2
   14     7        VERIFY_RETURN_TYPE                                       
          8      > RETURN                                                   null

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.88 ms | 998 KiB | 13 Q