3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public static function a(); public static function b($arg); } abstract class Base implements Foo { public static function a() { return __FUNCTION__ . '(' . __LINE__ . ')'; } } class Concrete extends Base { public static function b($arg) { return array(__FUNCTION__, __LINE__, $arg); } } var_dump(Concrete::a()); // works var_dump(Base::a()); // works var_dump(Concrete::b(__LINE__)); // works var_dump(Base::b(__LINE__)); // can't call an abstract method
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4EKo2
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'base'
   14     1        DECLARE_CLASS                                            'concrete', 'base'
   20     2        INIT_FCALL                                               'var_dump'
          3        INIT_STATIC_METHOD_CALL                                  'Concrete', 'a'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   21     7        INIT_FCALL                                               'var_dump'
          8        INIT_STATIC_METHOD_CALL                                  'Base', 'a'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   22    12        INIT_FCALL                                               'var_dump'
         13        INIT_STATIC_METHOD_CALL                                  'Concrete', 'b'
         14        SEND_VAL_EX                                              22
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
   23    18        INIT_FCALL                                               'var_dump'
         19        INIT_STATIC_METHOD_CALL                                  'Base', 'b'
         20        SEND_VAL_EX                                              23
         21        DO_FCALL                                      0  $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

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

End of function a

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

End of function b

End of class Foo.

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

End of function a

End of class Base.

Class Concrete:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4EKo2
function name:  b
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        INIT_ARRAY                                       ~1      'b'
          2        ADD_ARRAY_ELEMENT                                ~1      16
          3        ADD_ARRAY_ELEMENT                                ~1      !0
          4      > RETURN                                                   ~1
   17     5*     > RETURN                                                   null

End of function b

End of class Concrete.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.28 ms | 1456 KiB | 14 Q