3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { const C = 12; public static function test2(array $a); } interface I2 extends I { public static function test2(array $a, $b); } abstract class A implements I { const A = 14; protected static $var = 17; public function test(array $a){ return __METHOD__; } } class B extends A { const A = 15; public function test(array $a){ return __METHOD__; } //public static function test2(array $a){} } $v = new B(); var_dump($v->test(array(), ''));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DcEZ4
function name:  (null)
number of ops:  14
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'i2'
   10     1        DECLARE_CLASS                                            'a'
   18     2        DECLARE_CLASS                                            'b', 'a'
   25     3        NEW                                              $1      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   26     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'test'
          8        SEND_VAL_EX                                              <array>
          9        SEND_VAL_EX                                              ''
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function test2

End of class I.

Class I2:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DcEZ4
function name:  test2
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function test2

End of class I2.

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DcEZ4
function name:  test
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1      > RETURN                                                   'A%3A%3Atest'
   15     2*     > RETURN                                                   null

End of function test

End of class A.

Class B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DcEZ4
function name:  test
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1      > RETURN                                                   'B%3A%3Atest'
   22     2*     > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.06 ms | 1441 KiB | 14 Q