3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface exampleInterface { const _TYPE = array( "name1" => "0", "name2" => "1", "name3" => "2" ); public function x(); } class A implements exampleInterface { public function x() { var_dump(self::_TYPE); } } $a = new A; $a->x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LG2EM
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'a'
   23     1        NEW                                              $1      'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   24     4        INIT_METHOD_CALL                                         !0, 'x'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function x

End of class exampleInterface.

Class A:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LG2EM
function name:  x
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CLASS_CONSTANT                             ~0      '_TYPE'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   20     4      > RETURN                                                   null

End of function x

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.09 ms | 1395 KiB | 15 Q