3v4l.org

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

Class I:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vifFL
function name:  test
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 test

End of class I.

Class A: [no user functions]
Class B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vifFL
function name:  test
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_STATIC_PROP_R          unknown             ~1      'var'
          2      > RETURN                                                   ~1
   16     3*     > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.32 ms | 1387 KiB | 15 Q